X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaa6d89a0d0810b001a9217df913b9b74b883c8d..9d8fe14a97d1092989eecbe43c4e1f730fba17ad:/src/motif/choice.cpp diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 11153b562d..6c7edaa117 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -71,6 +71,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, { if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return false; + PreCreation(); Widget parentWidget = (Widget) parent->GetClientWidget(); @@ -138,9 +139,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL); - ChangeFont(false); - ChangeBackgroundColour(); - + PostCreation(); AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, bestSize.x, bestSize.y); @@ -195,7 +194,7 @@ int wxChoice::DoInsert(const wxString& item, unsigned int pos) #ifndef XmNpositionIndex wxCHECK_MSG( pos == GetCount(), -1, wxT("insert not implemented")); #endif - Widget w = XtVaCreateManagedWidget (wxStripMenuCodes(item), + Widget w = XtVaCreateManagedWidget (GetLabelText(item), #if wxUSE_GADGETS xmPushButtonGadgetClass, (Widget) m_menuWidget, #else @@ -450,7 +449,7 @@ void wxChoice::ChangeFont(bool keepOriginalSize) // Note that this causes the widget to be resized back // to its original size! We therefore have to set the size // back again. TODO: a better way in Motif? - if (m_font.Ok()) + if (m_mainWidget && m_font.Ok()) { Display* dpy = XtDisplay((Widget) m_mainWidget); int width, height, width1, height1;