Resizing maze

gao_bolin@voila.fr wrote:

Hello,

I am trying to have a squared panel that would grow along with the
frame it is contained in, and which would stay center. After trying
with sizers, I gave up and used SetDimensions instead. The code is
working OK (code below, with use_four = 0).

The problem is, when I stack four of these into a sizer, something
strange occurs [Windows XP, Python 2.4]: the behavior is as expected
as long as I expand the frame. When I shrink it, however, its
children would not shrink. What am I doing wrong? (code below, with
use_four = 1).

See http://wiki.wxpython.org/index.cgi/WindowSizeInfo and the info about the best size. Your panels don't have a sizer themselves, and no children, so their best size is their current size. So since the sizer will not make them smaller than their best size, which is their current size, they will grow but not shrink. If you give the panels a min size then that will be used by the sizers instead, and things will work more like you expect.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!