+// ----------------------------------------------------------------------------
+// wxComboCtrlTextCtrl
+// ----------------------------------------------------------------------------
+
+class wxComboCtrlTextCtrl : public wxTextCtrl
+{
+public:
+ wxComboCtrlTextCtrl() : wxTextCtrl() { }
+ virtual ~wxComboCtrlTextCtrl() { }
+
+ virtual wxWindow *GetMainWindowOfCompositeControl()
+ {
+ wxComboCtrl* combo = (wxComboCtrl*) GetParent();
+
+ // Returning this instead of just 'parent' lets FindFocus work
+ // correctly even when parent control is a child of a composite
+ // generic control (as is case with wxGenericDatePickerCtrl).
+ return combo->GetMainWindowOfCompositeControl();
+ }
+};
+