+}
+
+wxRadioBox::~wxRadioBox(void)
+{
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+ gtk_widget_destroy( button );
+ node = node->Next();
+ }
+}
+
+void wxRadioBox::OnSize( wxSizeEvent &event )
+{
+ wxControl::OnSize( event );
+
+ int x = m_x+5;
+ int y = m_y+15;
+
+ if (m_windowStyle & wxRA_VERTICAL)
+ {
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ y += 20;
+
+ int w = m_width-10;
+ if (w < 15) w = 15;
+ gtk_widget_set_usize( button, w, 20 );
+
+ node = node->Next();
+ }
+ }
+ else
+ {
+ int max = 0;
+
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkButton *button = GTK_BUTTON( node->Data() );
+ GtkLabel *label = GTK_LABEL( button->child );
+
+ GdkFont *font = m_widget->style->font;
+ int len = 27+gdk_string_measure( font, label->label );
+ if (len > max) max = len;
+
+ node = node->Next();
+ }
+
+ node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ x += max;
+ gtk_widget_set_usize( button, max, 20 );
+
+ node = node->Next();
+ }
+ }
+}