FAQ
I have a panel within a frame. I use sizers to layout items in the
panel. The frame is nothing but a container for the panel and a menu
bar and does not use any sizers. When I start the script, the Panel
takes up the smallest amount of space possible, and much of the frame
is left gray and unused. When I resize the frame by shrinking it or
expanding it by pulling on the frame border, the Panel suddently takes
up all the space in the frame, like it should do initially, but
doesn't. How can I fix this so on initialization, the panel takes up
all the space provided by the frame?

BTW, I am on a win2k system, running python 2.1, and wxpython 2.3.

Search Discussions

  • Robin Dunn at Jan 27, 2002 at 5:12 am
    "sameer" <sameer_ at email.com> wrote in message
    news:6bd9f01b.0201260038.5dfd75f7 at posting.google.com...
    I have a panel within a frame. I use sizers to layout items in the
    panel. The frame is nothing but a container for the panel and a menu
    bar and does not use any sizers. When I start the script, the Panel
    takes up the smallest amount of space possible, and much of the frame
    is left gray and unused. When I resize the frame by shrinking it or
    expanding it by pulling on the frame border, the Panel suddently takes
    up all the space in the frame, like it should do initially, but
    doesn't. How can I fix this so on initialization, the panel takes up
    all the space provided by the frame?
    Force a size event by not setting the initial size of the frame until after
    the contents have been created.


    --
    Robin Dunn
    Software Craftsman
    robin at AllDunn.com Java give you jitters?
    http://wxPython.org Relax with wxPython!
  • Sameer at Jan 27, 2002 at 9:49 am
    "Robin Dunn" <robin at stop.spam.alldunn.com> wrote in message news:<5%L48.86$A6.27643 at news.randori.com>...
    "sameer" <sameer_ at email.com> wrote in message
    news:6bd9f01b.0201260038.5dfd75f7 at posting.google.com...
    I have a panel within a frame. I use sizers to layout items in the
    panel. The frame is nothing but a container for the panel and a menu
    bar and does not use any sizers. When I start the script, the Panel
    takes up the smallest amount of space possible, and much of the frame
    is left gray and unused. When I resize the frame by shrinking it or
    expanding it by pulling on the frame border, the Panel suddently takes
    up all the space in the frame, like it should do initially, but
    doesn't. How can I fix this so on initialization, the panel takes up
    all the space provided by the frame?
    Force a size event by not setting the initial size of the frame until after
    the contents have been created.
    but I'd like the contents to grow to the size of the frame, not the
    other way around.
  • Vadim Zeitlin at Jan 28, 2002 at 5:43 pm

    On Sun, 27 Jan 2002 05:12:34 GMT, Robin Dunn wrote:
    Force a size event by not setting the initial size of the frame until after
    the contents have been created.
    Robin, this doesn't seem right to me - it's supposed to work without it as
    well. Do you know more about this problem and is it related to wxPython or
    wxWin itself?

    Thanks,
    VZ
    --
    GCS/GM d? H+ s++:-- p2 au--- a- w+ v C+++ UBLS+++ P- L++ N++ E--- W++++ M? V--
    -po+ R++ G`` !tv b+++ D--- e++++ u++ h--- f+ r++ n- y?
  • Sameer at Jan 30, 2002 at 1:33 pm
    Vadim Zeitlin <zeitlin at seth.lpthe.jussieu.fr> wrote in message news:<slrna5b3di.60o.zeitlin at seth.lpthe.jussieu.fr>...
    On Sun, 27 Jan 2002 05:12:34 GMT, Robin Dunn wrote:
    Force a size event by not setting the initial size of the frame until after
    the contents have been created.
    Robin, this doesn't seem right to me - it's supposed to work without it as
    well. Do you know more about this problem and is it related to wxPython or
    wxWin itself?

    Thanks,
    VZ
    Here's the problem more specifically.
    The user logs in from a dialog box, and is presented a panel that fits
    within the main frame. The user can then choose to logout. the panel
    is then destroyed, and the user is presented with the same dialog box
    to login again. when they login again, the same panel shows up, but
    now it's greatly shrunken in size and doesn't fill the frame. when
    the frame is resized by dragging its edges around, the Panel fills the
    frame again. i know all the code is not here, so it makes diagnosing
    a bit difficult, but any suggestions? If anyone would like to have a
    look at the code, the project is here:
    http://sourceforge.net/project/showfiles.php?group_idC028

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 26, '02 at 8:38a
activeJan 30, '02 at 1:33p
posts5
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase