wxPython, how to autoresize a frame?

D

David

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
 
D

David

Il Sun, 10 Sep 2006 19:15:40 +0200, David ha scritto:
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?
Best help came from mysef: the problem was in .SetSizeHints() statement
that prevented resizind of objects.

D.

--
R: Perche' incasina l'ordine con cui la gente normalmente legge un
messaggio
D: Perche' quotare sotto da' cosi' fastidio?
R: Quotare sotto.
D: Qual e' la cosa piu' seccante su usenet e in e-mail?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top