+void MyFrame::SetGravity(wxCommandEvent& WXUNUSED(event) )
+{
+ wxString str;
+ str.Printf( wxT("%g"), m_splitter->GetSashGravity());
+ str = wxGetTextFromUser(_T("Enter sash gravity (0,1):"), _T(""), str, this);
+ if ( str.empty() )
+ return;
+
+ double gravity = wxStrtod( str, (wxChar**)NULL);
+ m_splitter->SetSashGravity(gravity);
+#if wxUSE_STATUSBAR
+ str.Printf( wxT("Gravity = %g"), gravity);
+ SetStatusText(str, 1);
+#endif // wxUSE_STATUSBAR
+}
+
+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();
+ }
+}