]> git.saurik.com Git - wxWidgets.git/commitdiff
added handlers for radio btn events for testing
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Sep 2003 15:28:58 +0000 (15:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Sep 2003 15:28:58 +0000 (15:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp

index 5dc63aca099079beadb989557691e32da1de5fb2..d2f3693dfd0e360d923a1fd65e0fc3f07df7f530 100644 (file)
@@ -97,6 +97,8 @@ public:
     void OnComboButtons( wxCommandEvent &event );
     void OnRadio( wxCommandEvent &event );
     void OnRadioButtons( wxCommandEvent &event );
+    void OnRadioButton1( wxCommandEvent &event );
+    void OnRadioButton2( wxCommandEvent &event );
     void OnSetFont( wxCommandEvent &event );
     void OnPageChanged( wxNotebookEvent &event );
     void OnPageChanging( wxNotebookEvent &event );
@@ -464,6 +466,8 @@ EVT_BUTTON    (ID_RADIOBOX_SEL_NUM,     MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_SEL_STR,     MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_FONT,        MyPanel::OnRadioButtons)
 EVT_CHECKBOX  (ID_RADIOBOX_ENABLE,      MyPanel::OnRadioButtons)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_1,       MyPanel::OnRadioButton1)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_2,       MyPanel::OnRadioButton2)
 EVT_BUTTON    (ID_SET_FONT,             MyPanel::OnSetFont)
 EVT_SLIDER    (ID_SLIDER,               MyPanel::OnSliderUpdate)
 #if wxUSE_SPINBTN
@@ -1290,6 +1294,16 @@ void MyPanel::OnRadio( wxCommandEvent &event )
     m_text->AppendText( _T("\n") );
 }
 
+void MyPanel::OnRadioButton1( wxCommandEvent & WXUNUSED(event) )
+{
+    wxMessageBox(_T("First wxRadioButton selected."), _T("wxControl sample"));
+}
+
+void MyPanel::OnRadioButton2( wxCommandEvent & WXUNUSED(event) )
+{
+    m_text->AppendText(_T("Second wxRadioButton selected.\n"));
+}
+
 void MyPanel::OnRadioButtons( wxCommandEvent &event )
 {
     switch (event.GetId())