]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/choice.cpp
make sure we are comparing the stripped strings
[wxWidgets.git] / src / gtk / choice.cpp
index d4bcff0b9eba22a439664a0738803ce19791ade4..97eb8e120328d6edf4420f2c40eb70f1774fd69e 100644 (file)
@@ -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;
@@ -534,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
         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;
         }