]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/choice.cpp
Fixed refresh bug on early versions of MacOS X by
[wxWidgets.git] / src / motif / choice.cpp
index ed99311e799c0057d7843a8429e7660b90768019..bfe6a69b47c527efb9faffb9f023daa53a0f9496 100644 (file)
@@ -85,7 +85,6 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
     m_menuWidget = (WXWidget) XmCreatePulldownMenu ((Widget) m_formWidget,
                                                     "choiceMenu", NULL, 0);
 
-    //    int i;
     if (n > 0)
     {
         int i;
@@ -125,12 +124,16 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
 #endif
 #endif
 
+    wxSize bestSize = GetBestSize();
+    if( size.x > 0 ) bestSize.x = size.x;
+    if( size.y > 0 ) bestSize.y = size.y;
+
     XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
 
     ChangeFont(FALSE);
 
     AttachWidget (parent, m_buttonWidget, m_formWidget,
-                  pos.x, pos.y, size.x, size.y);
+                  pos.x, pos.y, bestSize.x, bestSize.y);
 
     ChangeBackgroundColour();