+ if ( !wxControl::Enable( enable ) )
+ return FALSE;
+
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkButton *button = GTK_BUTTON( node->Data() );
+ GtkWidget *label = button->child;
+ gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
+ gtk_widget_set_sensitive( label, enable );
+ node = node->Next();
+ }
+
+ return TRUE;
+}
+
+void wxRadioBox::Enable( int item, bool enable )
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
+
+ wxNode *node = m_boxes.Nth( item );
+
+ wxCHECK_RET( node, wxT("radiobox wrong index") );
+
+ GtkButton *button = GTK_BUTTON( node->Data() );
+ GtkWidget *label = button->child;
+ gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
+ gtk_widget_set_sensitive( label, enable );
+}
+
+void wxRadioBox::Show( int item, bool show )
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
+
+ wxNode *node = m_boxes.Nth( item );
+
+ wxCHECK_RET( node, wxT("radiobox wrong index") );
+
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+
+ if (show)
+ gtk_widget_show( button );
+ else
+ gtk_widget_hide( button );
+}
+
+wxString wxRadioBox::GetStringSelection() const
+{
+ wxCHECK_MSG( m_widget != NULL, wxT(""), wxT("invalid radiobox") );
+
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
+ if (button->active)
+ {
+ GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
+ return label->label;
+ }
+ node = node->Next();
+ }
+
+ wxFAIL_MSG( wxT("wxRadioBox none selected") );
+ return wxT("");
+}
+
+bool wxRadioBox::SetStringSelection( const wxString &s )
+{
+ wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid radiobox") );
+
+ int res = FindString( s );
+ if (res == -1) return FALSE;
+ SetSelection( res );
+
+ return TRUE;