+ if( !CreateControl( parent, id, pos, size, style,
+ wxDefaultValidator, name ) )
+ return false;
+ m_labelWidget = (WXWidget) 0;
+ PreCreation();
+
+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ Widget borderWidget =
+ (Widget) wxCreateBorderWidget( (WXWidget)parentWidget, style );
+
+ m_labelWidget =
+ XtVaCreateManagedWidget (name.mb_str(),
+ xmLabelWidgetClass,
+ borderWidget ? borderWidget : parentWidget,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
+ XmNalignment, ((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
+ ((style & wxALIGN_CENTRE) ? XmALIGNMENT_CENTER :
+ XmALIGNMENT_BEGINNING)),
+ XmNrecomputeSize, ((style & wxST_NO_AUTORESIZE) ? TRUE : FALSE),
+ NULL);
+
+ m_mainWidget = borderWidget ? borderWidget : m_labelWidget;