]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datectlg.cpp
Compile fix for Universal
[wxWidgets.git] / src / generic / datectlg.cpp
index 9c6bd88b3a3b3e60eaa61cea8a139bbd44d2041f..7648284451e3f69aaed31bdde8430cd00d3be375 100644 (file)
@@ -370,6 +370,7 @@ END_EVENT_TABLE()
 BEGIN_EVENT_TABLE(wxDatePickerCtrlGeneric, wxDatePickerCtrlBase)
     EVT_TEXT(wxID_ANY, wxDatePickerCtrlGeneric::OnText)
     EVT_SIZE(wxDatePickerCtrlGeneric::OnSize)
+    EVT_SET_FOCUS(wxDatePickerCtrlGeneric::OnFocus)
 END_EVENT_TABLE()
 
 #ifndef wxHAS_NATIVE_DATEPICKCTRL
@@ -404,6 +405,8 @@ bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
     m_combo = new wxComboCtrl(this, -1, wxEmptyString,
                               wxDefaultPosition, wxDefaultSize);
 
+    m_combo->SetCtrlMainWnd(this);
+
     m_popup = new wxCalendarComboPopup();
 
 #if defined(__WXMSW__)
@@ -524,6 +527,12 @@ void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev)
 }
 
 
+void wxDatePickerCtrlGeneric::OnFocus(wxFocusEvent& WXUNUSED(event))
+{
+    m_combo->SetFocus();
+}
+
+
 #endif // wxUSE_DATEPICKCTRL_GENERIC
 
 #endif // wxUSE_DATEPICKCTRL