]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/combobox_osx.cpp
cocoa needs a special implementation for read-only combo box
[wxWidgets.git] / src / osx / combobox_osx.cpp
index 762d575df1bd63c604060906e2b9d37f79f89061..3487ef9b178b6470cc504da89311d710bc48e928 100644 (file)
@@ -189,6 +189,14 @@ wxString wxComboBox::GetStringSelection() const
     return sel == wxNOT_FOUND ? wxString() : GetString(sel);
 }
 
+void wxComboBox::SetValue(const wxString& value)
+{
+    if ( HasFlag(wxCB_READONLY) )
+        SetStringSelection( value ) ;
+    else
+        wxTextEntry::SetValue( value );
+}
+
 void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
     // Notice that we shouldn't delete and insert the item in this control