]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
Added fix to send scroll messages from mouse wheel instead of scrolling directly
[wxWidgets.git] / samples / controls / controls.cpp
index 8ea9cf6b99588d9fa5b9e77a1ab9aa021a256a57..9a425672bba3ca15f717c3078a8300623a6b9245 100644 (file)
@@ -34,7 +34,7 @@
     #include "wx/tooltip.h"
 #endif
 
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
     #define USE_XPM
 #endif
 
@@ -794,6 +794,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     (void)new wxToggleButton(panel, ID_BUTTON_LABEL,
                              "&Toggle label", wxPoint(250, 20));
 #endif // wxUSE_TOGGLEBTN
+
     m_label = new wxStaticText(panel, -1, "Label with some long text",
                                wxPoint(250, 60), wxDefaultSize,
                                wxALIGN_RIGHT /*| wxST_NO_AUTORESIZE*/);
@@ -869,12 +870,16 @@ void MyPanel::OnPageChanging( wxNotebookEvent &event )
         }
     }
 
-    *m_text << "Notebook selection is being changed from " << selOld << "\n";
+    *m_text << "Notebook selection is being changed from " << selOld
+            << " to " << event.GetSelection()
+            << " (current page from notebook is "
+            << m_notebook->GetSelection() << ")\n";
 }
 
 void MyPanel::OnPageChanged( wxNotebookEvent &event )
 {
-    *m_text << "Notebook selection is " << event.GetSelection() << "\n";
+    *m_text << "Notebook selection is now " << event.GetSelection()
+            << " (from notebook: " << m_notebook->GetSelection() << ")\n";
 }
 
 void MyPanel::OnTestButton(wxCommandEvent& event)