]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/combobox.cpp
supporting PopUp on osx cocoa as well, see #10361
[wxWidgets.git] / src / osx / carbon / combobox.cpp
index 5bae2472354f56d1f31d76a52d7de72c4e63117d..54c70ebca55c6121be9a8e659237094409b96bf5 100644 (file)
@@ -137,6 +137,16 @@ protected:
             event.Skip();
     }
 
+    void OnFocus( wxFocusEvent& event )
+    {
+        // in case the textcontrol gets the focus we propagate
+        // it to the parent's handlers.
+        wxFocusEvent evt2(event.GetEventType(),m_cb->GetId());
+        evt2.SetEventObject(m_cb);
+        m_cb->GetEventHandler()->ProcessEvent(evt2);
+
+        event.Skip();
+    }
 private:
     wxComboBox *m_cb;
 
@@ -147,6 +157,8 @@ BEGIN_EVENT_TABLE(wxComboBoxText, wxTextCtrl)
     EVT_KEY_DOWN(wxComboBoxText::OnKeyDown)
     EVT_CHAR(wxComboBoxText::OnChar)
     EVT_KEY_UP(wxComboBoxText::OnKeyUp)
+    EVT_SET_FOCUS(wxComboBoxText::OnFocus)
+    EVT_KILL_FOCUS(wxComboBoxText::OnFocus)
     EVT_TEXT(wxID_ANY, wxComboBoxText::OnText)
 END_EVENT_TABLE()