]> git.saurik.com Git - wxWidgets.git/commitdiff
adding hook, but unfortunately no solution yet for wxComboBox::SetEditable
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 12 Jun 2013 06:51:24 +0000 (06:51 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 12 Jun 2013 06:51:24 +0000 (06:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/cocoa/private/textimpl.h
src/osx/cocoa/combobox.mm

index 6f8d963af58336c1560f9a4121e266116392001c..8b660c3eba16516c4c33679c82c4c8bae463b72e 100644 (file)
@@ -115,6 +115,8 @@ public :
     virtual void Popup();
     virtual void Dismiss();
 
+    virtual void SetEditable(bool editable);
+
 private:
     NSComboBox* m_comboBox;
 };
index 5c1cdd7fe2453428c3d1ffbe708d7cb8dec187d9..974ae190dc30fb179e39f8d709257c5ac901737e 100644 (file)
@@ -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),