X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6097743abad7f2e67b647546fc0af3889430e37e..53a6ac21b84c24bbfc2f03500f7edab73f8feff8:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 643732eb23..f158ee702e 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -59,6 +59,9 @@ public: : wxTextCtrl( cb , 1 ) { m_cb = cb; + + // remove the default minsize, the combobox will have one instead + SetSizeHints(-1,-1); } protected: @@ -139,6 +142,9 @@ public: : wxChoice( cb , 1 ) { m_cb = cb; + + // remove the default minsize, the combobox will have one instead + SetSizeHints(-1,-1); } protected: @@ -156,7 +162,8 @@ protected: virtual wxSize DoGetBestSize() const { wxSize sz = wxChoice::DoGetBestSize() ; - sz.x = POPUPWIDTH ; + if (! m_cb->HasFlag(wxCB_READONLY) ) + sz.x = POPUPWIDTH; return sz ; } @@ -342,6 +349,11 @@ wxString wxComboBox::GetValue() const return result; } +int wxComboBox::GetCount() const +{ + return m_choice->GetCount() ; +} + void wxComboBox::SetValue(const wxString& value) { int s = FindString (value);