X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1ca7b3dda18b48e83f9ad2f5f3ea9b22247197..db50ec5a50cc5ec605c0a1d7c50ecc62307f0066:/samples/toolbar/toolbar.cpp diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 66aaa9f85e..a862b1e378 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -532,8 +532,13 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +void MyFrame::OnAbout(wxCommandEvent& event) { + if ( event.IsChecked() ) + m_textWindow->WriteText( _T("Help button down now.\n") ); + else + m_textWindow->WriteText( _T("Help button up now.\n") ); + (void)wxMessageBox(_T("wxWindows toolbar sample"), _T("About wxToolBar")); } @@ -543,14 +548,6 @@ void MyFrame::OnToolLeftClick(wxCommandEvent& event) str.Printf( _T("Clicked on tool %d\n"), event.GetId()); m_textWindow->WriteText( str ); - if (event.GetId() == wxID_HELP) - { - if ( event.GetExtraLong() != 0 ) - m_textWindow->WriteText( _T("Help button down now.\n") ); - else - m_textWindow->WriteText( _T("Help button up now.\n") ); - } - if (event.GetId() == wxID_COPY) { DoEnablePrint();