hiding a boxsizer

Hi,
I've got two boxSizers that I need to switch back and forth depending on different phases of the app.

It seems to work if the boxSizers only contain simple controls, such as buttons, but one of the boxSizers also contains a gridBagSizer with a mixture of text, radio buttons and other simple controls. When I hide that boxSizer, the text, radio buttons, etc all remain on the display.

Is there any way to hide/show the gridBagSizer, or do I need to hide/show each of the component controls and detach/add the gridBagSizer?

Any suggestions would be welcome.

Thanks,

···

--
Dan Cherry
dscherry (@) bellsouth.net

Finding a solution to a problem doesn't solve the problem...
Implementing the solution solves the problem.

Dan Cherry wrote:

Hi,
I've got two boxSizers that I need to switch back and forth depending on different phases of the app.

It seems to work if the boxSizers only contain simple controls, such as buttons, but one of the boxSizers also contains a gridBagSizer with a mixture of text, radio buttons and other simple controls. When I hide that boxSizer, the text, radio buttons, etc all remain on the display.

Is there any way to hide/show the gridBagSizer, or do I need to hide/show each of the component controls and detach/add the gridBagSizer?

It should already work. Calling sizer.Show will recursively call Show on all the items in the sizer, including sub-sizers. Is it just nested GridBagSizers that have the problem, or does a nested BoxSizer also not get hidden?

···

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

Robin Dunn wrote:

Dan Cherry wrote:

Hi,
I've got two boxSizers that I need to switch back and forth depending on different phases of the app.

It seems to work if the boxSizers only contain simple controls, such as buttons, but one of the boxSizers also contains a gridBagSizer with a mixture of text, radio buttons and other simple controls. When I hide that boxSizer, the text, radio buttons, etc all remain on the display.

Is there any way to hide/show the gridBagSizer, or do I need to hide/show each of the component controls and detach/add the gridBagSizer?

It should already work. Calling sizer.Show will recursively call Show on all the items in the sizer, including sub-sizers. Is it just nested GridBagSizers that have the problem, or does a nested BoxSizer also not get hidden?

Sorry, Robin, my bad. While trying to work up a simplified example of my problem, I discovered that I misunderstood the parameters to feed into sizer.Show(xxx) and sizer.Hide(xxx). It's all working as it should, including GridBagSizers (which I guess is exactly what you said in your first sentence).

Thanks,

···

--
Dan Cherry
dscherry (@) bellsouth.net

Finding a solution to a problem doesn't solve the problem...
Implementing the solution solves the problem.