dynamically add/remove children?

Hi,

in an application i have a main frame where i can select
several "operation modes" of the application.

Depending on the operation mode i want to show or hide
other controls.

It would be great if i could place all necessary controls
for one operation mode into one panel and just show/hide
that panel.

Has anybody got an example for something like this?

wxWindow.Show/Hide() seems to show/hide the children but
seems to keep the place of the hidden parts empty.

AddChild / RemoveChild also does not seem to work as
expected and creating a panel without a parent also
does not seem to work.

Thanks for any hints,
Torsten.

Torsten Mohr wrote:

Hi,

in an application i have a main frame where i can select
several "operation modes" of the application.

Depending on the operation mode i want to show or hide
other controls.

It would be great if i could place all necessary controls
for one operation mode into one panel and just show/hide
that panel.

Has anybody got an example for something like this?

wxWindow.Show/Hide() seems to show/hide the children but
seems to keep the place of the hidden parts empty.

You probably just need to call Layout on the sizer and/or parent of the sizer.

- Mike