X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8c0d15d32ed5a362a8ef6a6a54de1f5bdbaf7f2..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/combobox_osx.cpp?ds=sidebyside diff --git a/src/osx/combobox_osx.cpp b/src/osx/combobox_osx.cpp index 00a8e571fe..3487ef9b17 100644 --- a/src/osx/combobox_osx.cpp +++ b/src/osx/combobox_osx.cpp @@ -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 @@ -207,7 +215,7 @@ void wxComboBox::EnableTextChangedEvents(bool WXUNUSED(enable)) bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); + wxCommandEvent event(wxEVT_COMBOBOX, m_windowId ); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection());