reparenting windows from a wxAuiNotebook to a wxPanel

Matthias Buelow mkb at incubus.de
Fri Mar 7 04:49:32 PST 2008


Hi folks,

I'd like to do something like the following:

I have a wxAuiNotebook with a number of children as its pages.
I want to reparent all the children into a different container, say, a
wxPanel (and lay them out in a grid using a wxGridSizer), and make the
notebook disappear. Ideally, I could switch back later on, that is,
reparent the windows from the panel to the notebook and somehow restore
its configuration (via LoadPaneInfo() or a similar method).
The general idea is to (upon a keypress) toggle a work area with child
windows between an AUI notebook display and a simple grid layout.

Is this at all possible? My attempts so far in reparenting children from
the notebook to a panel have been unsuccessful. I have tried using
wxWindow::Reparent() and using combinations of RemoveChild()/AddChild()
etc. but can't get the children to display in the panel. Should I try
some more or is this not possible?

I'm using wxGTK 2.8.7 but it would have to work on wxMSW and wxMac aswell.

Thanks for any answers.






More information about the wx-users mailing list