X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b45ed7a273799b1b360482496a706a211eca6435..8e35ab96f64a0ad21470043492e0153980b95382:/src/mac/listbox.cpp diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index 5240ef76be..b72970b0c2 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -137,7 +137,7 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect } #else { - wxCharBuffer text = wxMacStringToCString( linetext ) ; + wxCharBuffer text = linetext.mb_str( wxConvLocal) ; MoveTo(drawRect->left + 4 , drawRect->top + 10 ); DrawText(text, 0 , strlen(text) ); } @@ -202,7 +202,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - if ( !wxListBoxBase::Create(parent, id, pos, size, style, validator, name) ) + if ( !wxListBoxBase::Create(parent, id, pos, size, style & ~(wxHSCROLL|wxVSCROLL), validator, name) ) return false; m_noItems = 0 ; // this will be increased by our append command @@ -633,8 +633,7 @@ wxSize wxListBox::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); }