+ int i;
+ for (i = 0; i < n; i++)
+ {
+ wxString str(wxStripMenuCodes(choices[i]));
+ m_radioButtonLabels.push_back(str);
+ Widget radioItem = XtVaCreateManagedWidget (
+ wxConstCast(str.c_str(), char),
+#if wxUSE_GADGETS
+ xmToggleButtonGadgetClass, radioBoxWidget,
+#else
+ xmToggleButtonWidgetClass, radioBoxWidget,
+#endif
+ wxFont::GetFontTag(), m_font.GetFontTypeC(dpy),
+ NULL);
+ m_radioButtons.push_back((WXWidget)radioItem);
+ XtAddCallback (radioItem, XmNvalueChangedCallback,
+ (XtCallbackProc) wxRadioBoxCallback,
+ (XtPointer) this);
+ }
+
+ ChangeFont(false);
+
+ SetSelection (0);
+
+ XtRealizeWidget((Widget)m_mainWidget);
+ XtManageChild (radioBoxWidget);
+ XtManageChild ((Widget)m_mainWidget);
+
+ AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
+
+ ChangeBackgroundColour();
+
+ return true;