+ if( !wxControl::CreateControl( parent, id, pos, size, style, validator,
+ name ) )
+ return false;
+ PreCreation();
+
+ wxXmString text( GetLabelText(label) );
+
+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
+ xmToggleButtonWidgetClass, parentWidget,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
+ XmNlabelString, text(),
+ XmNrecomputeSize, False,
+ // XmNindicatorOn, XmINDICATOR_CHECK_BOX,
+ // XmNfillOnSelect, False,
+#if wxHAS_3STATE
+ XmNtoggleMode, Is3State() ? XmTOGGLE_INDETERMINATE : XmTOGGLE_BOOLEAN,
+#endif
+ NULL);
+
+ XtAddCallback( (Widget)m_mainWidget,
+ XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
+ (XtPointer)this );
+
+ XmToggleButtonSetState ((Widget) m_mainWidget, False, True);
+
+ PostCreation();
+ AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
+ pos.x, pos.y, size.x, size.y );
+
+ return true;