- wxString s;
- s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"),
- m_spinctrl->GetValue(), event.GetInt());
- m_text->AppendText(s);
+ if ( m_spinctrl )
+ {
+ wxString s;
+ s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"),
+ m_spinctrl->GetValue(), event.GetInt());
+ m_text->AppendText(s);
+ }
+}
+
+void MyPanel::OnSpinCtrlUp(wxSpinEvent& event)
+{
+ if ( m_spinctrl )
+ {
+ m_text->AppendText(wxString::Format(_T("Spin up: %d (from event: %d)\n"),
+ m_spinctrl->GetValue(), event.GetInt()));
+ }
+}
+
+void MyPanel::OnSpinCtrlDown(wxSpinEvent& event)
+{
+ if ( m_spinctrl )
+ {
+ m_text->AppendText(wxString::Format(_T("Spin down: %d (from event: %d)\n"),
+ m_spinctrl->GetValue(), event.GetInt()));
+ }