EVT_MENU(PANE_ABOUT, MyFrame::OnAbout)
EVT_MENU(PANE_QUIT, MyFrame::Quit)
EVT_MENU(PANE_ABOUT, MyFrame::OnAbout)
EVT_MENU(PANE_QUIT, MyFrame::Quit)
- EVT_UPDATE_UI(wxID_ANY, MyFrame::UpdateUI)
+ EVT_UPDATE_UI(PANE_COLLAPSE, MyFrame::OnCollapseUpdateUI)
+ EVT_UPDATE_UI(PANE_EXPAND, MyFrame::OnExpandUpdateUI)
paneMenu->Append(PANE_COLLAPSE, _T("Collapse\tCtrl-C"));
paneMenu->Append(PANE_EXPAND, _T("Expand\tCtrl-E"));
paneMenu->AppendSeparator();
paneMenu->Append(PANE_COLLAPSE, _T("Collapse\tCtrl-C"));
paneMenu->Append(PANE_EXPAND, _T("Expand\tCtrl-E"));
paneMenu->AppendSeparator();
paneMenu->AppendSeparator();
paneMenu->Append(PANE_SHOWDLG, _T("Show dialog...\tCtrl-S"));
paneMenu->AppendSeparator();
paneMenu->AppendSeparator();
paneMenu->Append(PANE_SHOWDLG, _T("Show dialog...\tCtrl-S"));
paneMenu->AppendSeparator();
- wxString text = wxGetTextFromUser(wxT("Input the new label"));
+ wxString text = wxGetTextFromUser
+ (
+ wxT("Enter new label"),
+ wxGetTextFromUserPromptStr,
+ m_collPane->GetLabel()
+ );
-void MyFrame::UpdateUI(wxUpdateUIEvent& event)
+void MyFrame::OnCollapseUpdateUI(wxUpdateUIEvent& event)
+{
+ event.Enable(!m_collPane->IsCollapsed());
+}
+
+void MyFrame::OnExpandUpdateUI(wxUpdateUIEvent& event)