+void MyFrame::Replace(wxCommandEvent& WXUNUSED(event) )
+{
+ if (m_replacewindow == 0) {
+ m_replacewindow = m_splitter->GetWindow2();
+ m_splitter->ReplaceWindow(m_replacewindow, new wxPanel(m_splitter, wxID_ANY));
+ m_replacewindow->Hide();
+ } else {
+ wxWindow *empty = m_splitter->GetWindow2();
+ m_splitter->ReplaceWindow(empty, m_replacewindow);
+ m_replacewindow->Show();
+ m_replacewindow = 0;
+ empty->Destroy();
+ }
+}
+