Dear wxpython-users
You will find below a little snippet that creates a frame that contains an auimanager with two panes inside. The panes are dockable and floatable and are docked at start up. If you run the snippet you will see that you get one pane on the left one pane on the right with empty grey space in between. My question/problem is the following: how to make one of the pane expandable in order that there is no grey space anymore at startup without using hardcoded minsize or bestsize paneinfo options ?
thanks a lot for your help
best regards
Eric
···
###########################################################
import wx
import wx.aui as aui
class MyFrame(wx.Frame):
def __init__(self, parent, id=-1, title="AUI Test",
pos=wx.DefaultPosition,
size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
self._mgr = aui.AuiManager()
self._mgr.SetManagedWindow(self)
text1 = wx.TextCtrl(self, -1, "Pane 1 - sample text")
text2 = wx.TextCtrl(self, -1, "Pane 2 - sample text")
self._mgr.AddPane(text1, aui.AuiPaneInfo().Left().Caption("Pane Number One"))
self._mgr.AddPane(text2, aui.AuiPaneInfo().Right().Caption("Pane Number Two"))
self._mgr.Update()
app = wx.App(0)
frame = MyFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()