Added check for wxCheckBox::SetValue()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-08-30 07:53:13 +00:00
parent 8317194692
commit b65c371ca8

View File

@@ -386,6 +386,7 @@ const int ID_LISTBOX_DELETE = 135;
const int ID_LISTBOX_FONT = 136;
const int ID_LISTBOX_ENABLE = 137;
const int ID_LISTBOX_SORTED = 138;
const int ID_LISTBOX_TOGGLE = 139;
const int ID_CHOICE = 120;
const int ID_CHOICE_SEL_NUM = 121;
@@ -444,6 +445,7 @@ EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_TOGGLE, MyPanel::OnListBoxButtons)
EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
EVT_CHOICE (ID_CHOICE_SORTED, MyPanel::OnChoice)
@@ -611,6 +613,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
(void)new MyButton( panel, ID_LISTBOX_APPEND, "&Append 'Hi!'", wxPoint(340,80), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_DELETE, "D&elete selected item", wxPoint(180,130), wxSize(140,30) );
wxButton *button = new MyButton( panel, ID_LISTBOX_FONT, "Set &Italic font", wxPoint(340,130), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_TOGGLE, "Toggle checkbox", wxPoint(340,180), wxSize(140,30) );
button->SetDefault();
@@ -1026,6 +1029,11 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
m_checkbox->SetFont( *wxITALIC_FONT );
break;
}
case ID_LISTBOX_TOGGLE:
{
m_checkbox->SetValue( TRUE );
break;
}
}
}