This question was posted about two months ago and Robin offered a solution
below. Basically, the solution was to post the resize events using
wx.CallAfter(). Why does this fix the problem? At least it fixed my
problem with ogl.ShapeCanvas resizing.
Thanks,
Ratko
Jenna Louis wrote:
Apparently a bug has crept into the multisash window since wx-2.5.3.1
In
wx-2.5.4.1 the multisash doesn't properly resize its children when
maximizing the window or resizing a child via one of the splitters. The
behavior can be easily reproduced in the wxPython Multisash demo. I am
running Windows XP SP2, Python 2.3.3, and wx-2.5.4-ansi.
wxWidgets on MSW has started using Windows' ability to do deferred
resizing which is nice for ensuring that all sizing updates happen all
at once, but it can cause problems like this. Please try this change
and see if that fixes it for you:
Index: wxPython/wx/lib/multisash.py
ยทยทยท
===================================================================
RCS file:
/pack/cvsroots/wxwidgets/wxWidgets/wxPython/wx/lib/multisash.py,v
retrieving revision 1.12
diff -u -4 -r1.12 multisash.py
--- wxPython/wx/lib/multisash.py 2004/11/10 18:16:22 1.12
+++ wxPython/wx/lib/multisash.py 2005/03/23 01:41:13
@@ -365,14 +365,16 @@
def CanSize(self,side):
return self.GetParent().CanSize(side,self)
def OnSize(self,evt):
- self.sizerHor.OnSize(evt)
- self.sizerVer.OnSize(evt)
- self.creatorHor.OnSize(evt)
- self.creatorVer.OnSize(evt)
- self.detail.OnSize(evt)
- self.closer.OnSize(evt)
+ def doresize():
+ self.sizerHor.OnSize(evt)
+ self.sizerVer.OnSize(evt)
+ self.creatorHor.OnSize(evt)
+ self.creatorVer.OnSize(evt)
+ self.detail.OnSize(evt)
+ self.closer.OnSize(evt)
+ wx.CallAfter(doresize)