From: Stefan Csomor Date: Wed, 12 Jun 2013 06:51:24 +0000 (+0000) Subject: adding hook, but unfortunately no solution yet for wxComboBox::SetEditable X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d4e5c5b98a5a80c5cc65776f2add32ff543c2972 adding hook, but unfortunately no solution yet for wxComboBox::SetEditable git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/private/textimpl.h b/include/wx/osx/cocoa/private/textimpl.h index 6f8d963af5..8b660c3eba 100644 --- a/include/wx/osx/cocoa/private/textimpl.h +++ b/include/wx/osx/cocoa/private/textimpl.h @@ -115,6 +115,8 @@ public : virtual void Popup(); virtual void Dismiss(); + virtual void SetEditable(bool editable); + private: NSComboBox* m_comboBox; }; diff --git a/src/osx/cocoa/combobox.mm b/src/osx/cocoa/combobox.mm index 5c1cdd7fe2..974ae190dc 100644 --- a/src/osx/cocoa/combobox.mm +++ b/src/osx/cocoa/combobox.mm @@ -210,6 +210,14 @@ void wxNSComboBoxControl::Dismiss() [ax accessibilitySetValue: [NSNumber numberWithBool: NO] forAttribute: NSAccessibilityExpandedAttribute]; } +void wxNSComboBoxControl::SetEditable(bool editable) +{ + // TODO: unfortunately this does not work, setEditable just means the same as CB_READONLY + // I don't see a way to access the text field directly + NSComboBoxCell* c = [m_comboBox cell]; + [c setEditable:editable]; +} + wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxComboBox* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id),