I want to dynamically destroy/create window contents.
If I understand correctly wxWindow::DestroyChildren destroys all children, but not sizer.
So if I create new wxSizer and call wxWindow::SetSizer - what will happen with old sizer? Memory leak?
Is it a proper way to recreate window contents or is there better solution? Could you point me to any article on example?
destroy and recreate window contents
-
- Knows some wx things
- Posts: 38
- Joined: Mon Jun 20, 2011 12:03 pm
-
- Site Admin
- Posts: 6695
- Joined: Thu Sep 28, 2006 12:23 am
Re: destroy and recreate window contents
The easiest way is probably to remove the wxPanel that contains all your widgets (you should have one) with ->Destroy(), and then create a new one. That should be straightforward
"Keyboard not detected. Press F1 to continue"
-- Windows
-- Windows