]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/choice.cpp
Use checkbox if togglebutton not available.
[wxWidgets.git] / src / gtk / choice.cpp
index c9e3cceac2b568532a13cfae7e7692ce6cc88aa7..485f3fbdfb67497cae39bdc6eedc97d7dcc3b483 100644 (file)
@@ -448,14 +448,11 @@ wxSize wxChoice::DoGetBestSize() const
     ret.x = 0;
     if ( m_widget )
     {
-        GdkFont *font = m_font.GetInternalFont();
-
-        wxCoord width;
+        int width;
         size_t count = GetCount();
         for ( size_t n = 0; n < count; n++ )
         {
-            // FIXME GTK 2.0
-            width = (wxCoord)gdk_string_width(font, wxGTK_CONV( GetString(n) ) );
+            GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
             if ( width > ret.x )
                 ret.x = width;
         }