Panel sizing before 1st time shown

Hi all,

In parts of my application, I query a window for its size, usually
with GetClientSize(), in order to set the size of other widgets being
constructed, or to decide how to scale an image before it is shown.
The problem I often run into is that GetClientSize doesn't return the
correct size if the window has not yet been shown. Examples include a
panel in a notebook page that the user hasn't selected yet, or a panel
in a second frame that is normally hidden, but then the frame is
brought forward upon a user selection.

In the case of the second frame, I am using a horizontal sizer for two panels:

class SecondFrame(wx.Frame):

to show it the first time I use frame.ShowFullScreen(True), and
subsequently use frame.Show(). Is there a way to get the size the
frame's panels will be after it is shown the first time?

I hit "send" by accident. Please disregard this until I finish
writing it and send it again! (unless with what I have written so far
there is something obvious). Sorry.
-Chris Botos

ยทยทยท

On Tue, Apr 15, 2008 at 9:38 AM, chris botos <chris.botos@gmail.com> wrote:

Hi all,

In parts of my application, I query a window for its size, usually
with GetClientSize(), in order to set the size of other widgets being
constructed, or to decide how to scale an image before it is shown.
The problem I often run into is that GetClientSize doesn't return the
correct size if the window has not yet been shown. Examples include a
panel in a notebook page that the user hasn't selected yet, or a panel
in a second frame that is normally hidden, but then the frame is
brought forward upon a user selection.

In the case of the second frame, I am using a horizontal sizer for two panels:

class SecondFrame(wx.Frame):

to show it the first time I use frame.ShowFullScreen(True), and
subsequently use frame.Show(). Is there a way to get the size the
frame's panels will be after it is shown the first time?