Retrieving FoldPanelBar Width

I would like to retrieve the width of the FoldPanelBar CaptionBar so that I can have the children automatically resize to the current window size like the FoldPanelBar itself does (it appears as though this does not occur by default). However, every time that I retrieve the Size of the FoldPanelBar, any of its children, or its parent, it returns the default size of (20,20). What I truly want is the width of the caption bar. Are there any suggestions or workarounds or am I completely missing something that would allow the children to be resized with the Captionbar. Thanks.

-Jonathan

Jonathan Suever wrote:

I would like to retrieve the width of the FoldPanelBar CaptionBar so that I can have the children automatically resize to the current window size like the FoldPanelBar itself does (it appears as though this does not occur by default). However, every time that I retrieve the Size of the FoldPanelBar, any of its children, or its parent, it returns the default size of (20,20). What I truly want is the width of the caption bar. Are there any suggestions or workarounds or am I completely missing something that would allow the children to be resized with the Captionbar. Thanks.

You are probably fetching the size before the window has been shown and/or laid out. You probably want to catch the FPB's EVT_SIZE event and resize the children at that point in time.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!