+void wxRadioBox::ChangeFont(bool keepOriginalSize)
+{
+ wxWindow::ChangeFont(keepOriginalSize);
+
+ WXFontType fontType =
+ m_font.GetFontType(XtDisplay((Widget) GetTopWidget()));
+
+ int i;
+ for (i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ XtVaSetValues ((Widget) radioButton,
+ wxFont::GetFontTag(), fontType,
+ NULL);
+ }
+}
+
+void wxRadioBox::ChangeBackgroundColour()
+{
+ wxWindow::ChangeBackgroundColour();
+
+ int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget));
+
+ int i;
+ for (i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ wxDoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
+
+ XtVaSetValues ((Widget) radioButton,
+ XmNselectColor, selectPixel,
+ NULL);
+ }
+}
+
+void wxRadioBox::ChangeForegroundColour()
+{
+ wxWindow::ChangeForegroundColour();
+
+ int i;
+ for (i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ wxDoChangeForegroundColour(radioButton, m_foregroundColour);
+ }
+}
+
+static int CalcOtherDim( int items, int dim )
+{
+ return items / dim + ( items % dim ? 1 : 0 );
+}
+
+int wxRadioBox::GetRowCount() const
+{
+ return m_windowStyle & wxRA_SPECIFY_ROWS ? m_noRowsOrCols
+ : CalcOtherDim( GetCount(), m_noRowsOrCols );
+}
+
+int wxRadioBox::GetColumnCount() const
+{
+ return m_windowStyle & wxRA_SPECIFY_COLS ? m_noRowsOrCols
+ : CalcOtherDim( GetCount(), m_noRowsOrCols );
+}
+