NULL, this);
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED,
- wxCommandEventHandler(wxGenericCalendarCtrl::OnYearChange),
+ wxSpinEventHandler(wxGenericCalendarCtrl::OnYearChange),
NULL, this);
}
SetDateAndNotify(target);
}
-void wxGenericCalendarCtrl::OnYearChange(wxCommandEvent& event)
+void wxGenericCalendarCtrl::HandleYearChange(wxCommandEvent& event)
{
int year = (int)event.GetInt();
if ( year == INT_MIN )
}
}
+void wxGenericCalendarCtrl::OnYearChange(wxSpinEvent& event)
+{
+ HandleYearChange( event );
+}
+
void wxGenericCalendarCtrl::OnYearTextChange(wxCommandEvent& event)
{
SetUserChangedYear();
- OnYearChange(event);
+ HandleYearChange(event);
}
// Responds to colour changes, and passes event on to children.