wxPython, how to autoresize a frame?

David 71david at libero.it
Sun Sep 10 13:15:40 EDT 2006


Dear all,

In a wxPyhton frame I make a group of controls hiding by pressing a button
and i want the whole frame to resize accordingly.

The test GUI I wrote is structured like this:

frame
  |
  +-sizer0 (BoxSizer, 1 slot)
      |
      +-panel (style=wx.EXPAND)
          |
          +-sizer1 (BoxSizer vertical, 2 slots)
              |
              +-sizer2 (FlexGridSizer, 2x2)
              |   |
              |   +-controls to hide
              |
              +-button


The problem is that, when sizer2 containig hidden controls collapses to
zero dimensions, the panel resizes, but sizer1 and sizer0 don't!
Consequently the frame does not want to autoresize.

You con dowload the code here:
http://www.box.net/public/evfxs7cp5j

Someone con help me?

Thanks

David



More information about the Python-list mailing list