]> git.saurik.com Git - wxWidgets.git/commitdiff
Use checkbox if togglebutton not available.
authorMattia Barbon <mbarbon@cpan.org>
Sat, 11 Jan 2003 15:00:26 +0000 (15:00 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 11 Jan 2003 15:00:26 +0000 (15:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp

index 0b8561cef52f2877aed51f5f4aaa81f387df9ca1..dd42a800642ccf5d9b917e14d9a6cfc03f600a7d 100644 (file)
@@ -481,6 +481,8 @@ EVT_TEXT      (ID_SPINCTRL,             MyPanel::OnSpinCtrlText)
 #endif // wxUSE_SPINCTRL
 #if wxUSE_TOGGLEBTN
 EVT_TOGGLEBUTTON(ID_BUTTON_LABEL,       MyPanel::OnUpdateLabel)
+#else
+EVT_CHECKBOX(ID_BUTTON_LABEL,       MyPanel::OnUpdateLabel)
 #endif // wxUSE_TOGGLEBTN
 EVT_CHECKBOX  (ID_CHANGE_COLOUR,        MyPanel::OnChangeColour)
 EVT_BUTTON    (ID_BUTTON_TEST1,         MyPanel::OnTestButton)
@@ -837,6 +839,9 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
 #if wxUSE_TOGGLEBTN
     (void)new wxToggleButton(panel, ID_BUTTON_LABEL,
                              _T("&Toggle label"), wxPoint(250, 20));
+#else
+    (void)new wxCheckBox(panel, ID_BUTTON_LABEL,
+                         _T("&Toggle label"), wxPoint(250, 20));
 #endif // wxUSE_TOGGLEBTN
 
     m_label = new wxStaticText(panel, -1, _T("Label with some long text"),