Hi, I also encountered this kind of flaw in aui; see an older thread:
http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:msp:71855
a workaround - checking the size of all panes - has been proposed by Max Landaeus, in the recent version in another thread:
http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:mss:73211
It seems, that it can be further refined - especially with respect to the resizing the whole frame - this way an infinite loop can be triggered - the recursion depth error is guarded with the variable renderIsListening; however, the checks for outOfRange sometimes keep beeing called until the window isn’t resized back to be enough for all panes.
Currently I use a simple solution for this - a parallel record (last_ok_size) for the last usable frame size.
init function of AUIFrame
…
self.renderIsListening=True # Max’s guarding variable
self.last_ok_size = (800,600) # some default # added
the important part of onRender function then looks like:
…
if outOfRange:
self.SetSize(self.last_ok_size) # added # sets the frame to the last size not (yet) causing problems with aui Manager
# If any window is to small restore the previous perspective
self._mgr.LoadPerspective(self.lastGoodPerspective)
self._mgr.Update()
self.Refresh()
else:
self.last_ok_size = self.GetSize() # added # save the usable frame size as a potential fallback
# All windows are OK save this perspective for next time
self.lastGoodPerspective=self._mgr.SavePerspective()
event.Skip()
However, this way the code causes a visual flicker, if the user resizes the window to a not allowed smaller size, hence this workaround will probably need some tweaking; but at least the infinite loop doesn’t seem to occur this way, which could be quite ressources-expensive.
hth,
Vlasta
···
2008/5/15, Can Xue xuecan@gmail.com:
In the AUI_DockingWindowMgr Demo, when a user dragging a pane’s border too far, then the pane may cover another.
How to avoid this by program?
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users