X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b45ed7a273799b1b360482496a706a211eca6435..007bea23c3245bac82c24c0f783a7baa5ac672cc:/src/mac/carbon/choice.cpp diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index 2275ce10c0..c963dcad32 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -63,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]); @@ -271,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); }