X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17a6a662f7d7932983fc29892854fad56a82057b..4c9d78a4f9f07957e9e38f783d0ee615e609de73:/src/mac/choice.cpp diff --git a/src/mac/choice.cpp b/src/mac/choice.cpp index c187d9ecc7..c963dcad32 100644 --- a/src/mac/choice.cpp +++ b/src/mac/choice.cpp @@ -46,6 +46,9 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { + if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) ) + return false; + Rect bounds ; Str255 title ; @@ -60,6 +63,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, if ( n > 0 ) SetControl32BitValue( (ControlHandle) m_macControl , 1 ) ; MacPostControlCreate() ; + // TODO wxCB_SORT for ( int i = 0; i < n; i++ ) { Append(choices[i]); @@ -268,8 +272,7 @@ wxSize wxChoice::DoGetBestSize() const &baseline ); wLine = bounds.h ; #else - wxCharBuffer text = wxMacStringToCString( str ) ; - wLine = ::TextWidth( text , 0 , strlen(text) ) ; + wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ; #endif lbWidth = wxMax(lbWidth, wLine); }