wx.SplitterWindow not resizing with parent Frame ?

  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)

and then:
  def OnSize(self, event):
        size = event.GetSize()
        print "size:", size.width, size.height

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.

self.splitter = wx.SplitterWindow(self, style = wx.SIMPLE_BORDER)

That worked for me. Look at my past replies for more code.

···

On 6/29/06, Anders Wallin anders.wallin@helsinki.fi wrote:

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)

and then:
def OnSize(self, event):
size = event.GetSize()
print “size:”, size.width, size.height

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 ??


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org