added a test for check tbar buttons state

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-01-01 23:36:08 +00:00
parent 30e0e2518f
commit e08bbf3708

View 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();