m_strings = (wxSortedArrayString *)NULL;
}
+bool wxChoice::Create( wxWindow *parent, wxWindowID id,
+ const wxPoint &pos, const wxSize &size,
+ const wxArrayString& choices,
+ long style, const wxValidator& validator,
+ const wxString &name )
+{
+ wxCArrayString chs(choices);
+
+ return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(),
+ style, validator, name );
+}
+
bool wxChoice::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
int n, const wxString choices[],
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
SetBestSize(size);
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
- GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
+ GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
if ( width > ret.x )
ret.x = width;
}