From a48b9bfb143177fcd0982cff5f4471775aa224eb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Sep 2003 15:28:58 +0000 Subject: [PATCH] added handlers for radio btn events for testing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 5dc63aca09..d2f3693dfd 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -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()) -- 2.45.2