X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c13c9657a402c546d36d51628aec65903deb6605..a006e78bd388dfb86f8b34ede2034047c062cffb:/src/motif/choice.cpp diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index ed99311e79..bfe6a69b47 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -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();