I am trying to create a wxPython frame that is just the size of the toolbar I created.
I have successfully created the wx.Frame and empty toolbar but the window is far too big, how do I make it just fit the toolbar.
Code I tried:
import wx
class Example(wx.Frame):
def __init__(self, *args, **kwargs):
super(Example, self).__init__(*args, **kwargs)
vbox = wx.BoxSizer(wx.VERTICAL)
toolbar1 = wx.ToolBar(self)
toolbar1.SetToolBitmapSize(wx.Size(64, 64))
toolbar1.Realize()
vbox.Add(toolbar1, 0, wx.EXPAND)
self.SetSizer(vbox)
self.SetTitle('Toolbars')
self.Centre()
vbox.Fit(self)
app = wx.App()
ex = Example(None)
ex.Show()
app.MainLoop()