-int wxRadioBox::FindString( const wxString &find, bool bCase ) const
-{
- wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid radiobox") );
-
- int count = 0;
-
- wxList::compatibility_iterator node = m_boxes.GetFirst();
- while (node)
- {
- GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->GetData()) );
-#ifdef __WXGTK20__
- wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
-#else
- wxString str( label->label );
-#endif
- if (find.IsSameAs( str, bCase ))
- return count;
-
- count++;
-
- node = node->GetNext();
- }
-
- return wxNOT_FOUND;
-}
-
-void wxRadioBox::SetFocus()
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
-
- if (m_boxes.GetCount() == 0) return;
-
- wxList::compatibility_iterator node = m_boxes.GetFirst();
- while (node)
- {
- GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->GetData() );
- if (button->active)
- {
- gtk_widget_grab_focus( GTK_WIDGET(button) );
- return;
- }
- node = node->GetNext();
- }
-}
-