unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -620,7 +620,20 @@ wxSize wxListBox::DoGetBestSize() const
|
||||
// Find the widest line
|
||||
for(int i = 0; i < GetCount(); i++) {
|
||||
wxString str(GetString(i));
|
||||
wLine = ::TextWidth( str.c_str() , 0 , str.Length() ) ;
|
||||
#if wxUSE_UNICODE
|
||||
Point bounds={0,0} ;
|
||||
SInt16 baseline ;
|
||||
::GetThemeTextDimensions( wxMacCFStringHolder( str ) ,
|
||||
kThemeCurrentPortFont,
|
||||
kThemeStateActive,
|
||||
false,
|
||||
&bounds,
|
||||
&baseline );
|
||||
wLine = bounds.h ;
|
||||
#else
|
||||
wxCharBuffer text = wxMacStringToCString( str ) ;
|
||||
wLine = ::TextWidth( text , 0 , strlen(text) ) ;
|
||||
#endif
|
||||
lbWidth = wxMax(lbWidth, wLine);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user