+ if( !wxControl::CreateControl( parent, id, pos, size, style, validator,
+ name ) )
+ return false;
+
+ wxString label1(wxStripMenuCodes(label));
+ wxXmString text( label1 );
+
+ 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);
+
+ AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
+ pos.x, pos.y, size.x, size.y );
+
+ ChangeBackgroundColour();
+ return true;