wxPython, how to autoresize a frame?

Discussion in 'Python' started by David, Sep 10, 2006.

  1. David

    David Guest

    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
     
    David, Sep 10, 2006
    #1
    1. Advertising

  2. David

    David Guest

    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?
     
    David, Sep 12, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. YaKs
    Replies:
    0
    Views:
    723
  2. Anand
    Replies:
    1
    Views:
    374
    Cliff Wells
    Jul 23, 2003
  3. ulysses
    Replies:
    4
    Views:
    823
    Werner Schiendl
    Oct 22, 2003
  4. Logan
    Replies:
    5
    Views:
    793
    David Bolen
    Dec 11, 2003
  5. Ruben Charles
    Replies:
    6
    Views:
    519
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Oct 25, 2005
Loading...

Share This Page