Actually, you don't need to. Menubar, toolbar and statusbar don't
count. The only other control in the frame will occupy all the frame's
remaining client area. But only if you don't bind your own handler to
EVT_SIZE. In this case, you'll need to call somethings like
self.theMainPanel.SetSize(self.GetClientSizeTuple())
inside your handler. The sizers don't work also, if EVT_SIZE is
overridden, so you should call self.Layout() in the handler.
This is it !
For the Frame, I had:
self.Bind(wx.EVT_SIZE, self.OnSize)
If I remove the bind statement the splitterwindow resizes correctly.
What should I put in OnSize() so that the splitterwindow will resize
correctly again ? I have tried with
self.Layout()
self.sp.Layout()
self.p1.Layout()
self.p2.Layout()
but they have no effect...
AW
PS. why is the behavior of print different with different demo programs I
try ? Some write to the python prompt, some open a separate
wxPython:stdout/sterr window although the code is very similar ??
In my work with splitters, the splitter resizes correctly even though I didn’t bind it to EVT_SIZE. I don’t think you need SP_LIVE_UPDATE as a style option.
Actually, you don’t need to. Menubar, toolbar and statusbar don’t
count. The only other control in the frame will occupy all the frame’s
remaining client area. But only if you don’t bind your own handler to
EVT_SIZE. In this case, you’ll need to call somethings like
self.theMainPanel.SetSize(self.GetClientSizeTuple())
inside your handler. The sizers don’t work also, if EVT_SIZE is
overridden, so you should call self.Layout() in the handler.
This is it !
For the Frame, I had:
self.Bind(wx.EVT_SIZE, self.OnSize)