]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/radiobox.cpp
Changes to WXDLLEXPORT keyword position for VC++ 6.0; changed
[wxWidgets.git] / src / motif / radiobox.cpp
index d1ec6278cdf6d51c898a685a6ee57b1d9d5c0e82..a5e78b76384581b4eef193f23d3a5812d9bb537b 100644 (file)
@@ -59,6 +59,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     m_radioButtonLabels = (wxString*) NULL;
     m_backgroundColour = parent->GetBackgroundColour();
     m_foregroundColour = parent->GetForegroundColour();
+    m_windowFont = parent->GetFont();
 
     SetName(name);
     SetValidator(val);
@@ -93,6 +94,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 
     m_formWidget = (WXWidget) formWidget;
 
+    XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
     if (label1 != "")
     {
         text = XmStringCreateSimple ((char*) (const char*) label1);
@@ -104,16 +106,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 #else
                                             xmLabelWidgetClass, formWidget,
 #endif
+                                             XmNfontList, fontList,
                                             XmNlabelString, text,
                                             NULL);
 
-/* TODO: change label font
-        if (labelFont)
-               XtVaSetValues (labelWidget,
-                      XmNfontList, labelFont->GetInternalFont (XtDisplay(formWidget)),
-                      NULL);
-*/
-
         XmStringFree (text);
     }
 
@@ -159,16 +155,11 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
 #else
                                    xmToggleButtonWidgetClass, radioBoxWidget,
 #endif
+                                    XmNfontList, fontList,
                                                 NULL);
         XtAddCallback ((Widget) m_radioButtons[i], XmNvalueChangedCallback, (XtCallbackProc) wxRadioBoxCallback,
                     (XtCallbackProc) this);
 
-/* TODO: set font
-        if (buttonFont)
-               XtVaSetValues ((Widget) m_radioButtons[i],
-                      XmNfontList, buttonFont->GetInternalFont (XtDisplay(formWidget)),
-                      NULL);
-*/
     }
     SetSelection (0);