git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53014
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+ void MSWOnClick(wxMouseEvent& event);
void MSWOnDoubleClick(wxMouseEvent& event);
private:
event.Skip();
break;
}
+
+ // as we don't (always) skip the message, we're not going to receive the
+ // focus on click by default if we don't do it ourselves
+ SetFocus();
}
wxCalendarHitTestResult wxGenericCalendarCtrl::HitTest(const wxPoint& pos,
UpdateMarks();
+ Connect(wxEVT_LEFT_DOWN,
+ wxMouseEventHandler(wxCalendarCtrl::MSWOnClick));
Connect(wxEVT_LEFT_DCLICK,
wxMouseEventHandler(wxCalendarCtrl::MSWOnDoubleClick));
event.Skip();
}
+void wxCalendarCtrl::MSWOnClick(wxMouseEvent& event)
+{
+ // for some reason, the control doesn't get focus on its own when the user
+ // clicks in it
+ SetFocus();
+
+ event.Skip();
+}
+
#endif // wxUSE_CALENDARCTRL