X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34b5e560a9f6376c0da05e8b3b2f1d0870ff8639..9f7948af90ec2e3b907944e7d979f0863910c5c8:/src/gtk1/choice.cpp diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 6d72df1233..6eef00f624 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -73,6 +73,18 @@ wxChoice::wxChoice() 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[], @@ -111,14 +123,10 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); PostCreation(); - - SetFont( parent->GetFont() ); + InheritAttributes(); SetBestSize(size); - SetBackgroundColour( parent->GetBackgroundColour() ); - SetForegroundColour( parent->GetForegroundColour() ); - Show( TRUE ); return TRUE; @@ -346,7 +354,7 @@ int wxChoice::GetSelection() const #endif } -void wxChoice::SetString( int WXUNUSED(n), const wxString& WXUNUSED(string) ) +void wxChoice::SetString( int n, const wxString& str ) { wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );