const wxValidator& validator,
const wxString& name)
{
+ if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) )
+ return false;
+
Rect bounds ;
Str255 title ;
if ( n > 0 )
SetControl32BitValue( (ControlHandle) m_macControl , 1 ) ;
MacPostControlCreate() ;
+ // TODO wxCB_SORT
for ( int i = 0; i < n; i++ )
{
Append(choices[i]);
wxString wxChoice::GetString(int n) const
{
+ wxCHECK_MSG( n >= 0 && (size_t)n < m_strings.GetCount(), _T(""),
+ _T("wxChoice::GetString(): invalid index") );
+
return m_strings[n] ;
}
+
// ----------------------------------------------------------------------------
// client data
// ----------------------------------------------------------------------------
&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);
}