X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d1a4878f36ba4b5f66c2ccfd2cb27a9dc528b6f..0d5eaa50960aa239d910fc271f5282f24c0937cb:/src/mac/carbon/combobox.cpp?ds=sidebyside diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 7e6da680cf..110daa1c21 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -15,6 +15,8 @@ #include "wx/wxprec.h" +#if wxUSE_COMBOBOX + #include "wx/combobox.h" #include "wx/button.h" #include "wx/menu.h" @@ -359,7 +361,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, } SetBestSize(size); // Needed because it is a wxControlWithItems - + SetStringSelection(value); + return true; } @@ -565,18 +568,6 @@ wxString wxComboBox::GetStringSelection() const return wxEmptyString; } -bool wxComboBox::SetStringSelection(const wxString& sel) -{ - int s = FindString (sel); - if (s > -1) - { - SetSelection (s); - return true; - } - else - return false; -} - void wxComboBox::SetString(int n, const wxString& s) { m_choice->SetString( n , s ) ; @@ -656,3 +647,4 @@ wxInt32 wxComboBox::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR return noErr ; } +#endif