]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
workaround for not appearing vertical scrollbar in wxTE_RICH2 controls
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 66aaa9f85e23c213f017f12b0b0f42ef48e279c3..a862b1e378d63e28d40e2ff1e05c1c43c26b6cab 100644 (file)
@@ -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();