]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/choice.cpp
Added window styles to wxToolBar handler.
[wxWidgets.git] / src / gtk / choice.cpp
index 6eef00f62464aaa8624cee8ed764329769eeadde..384f8b5d0048366b24c45f4d8736dff21b23c026 100644 (file)
@@ -122,12 +122,8 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
 
     m_parent->DoAddChild( this );
 
-    PostCreation();
-    InheritAttributes();
-
-    SetBestSize(size);
-
-    Show( TRUE );
+    PostCreation(size);
+    SetBestSize(size); // need this too because this is a wxControlWithItems
 
     return TRUE;
 }
@@ -542,7 +538,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;
         }
@@ -578,6 +574,13 @@ bool wxChoice::IsOwnGtkWindow( GdkWindow *window )
 #endif
 }
 
+// static
+wxVisualAttributes
+wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    return GetDefaultAttributesFromGTKWidget(gtk_option_menu_new);
+}
+
 
 #endif // wxUSE_CHOICE