I've put live into Vadim's wxNavigationKeyEvent idea

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-12-17 08:40:34 +00:00
parent 105e45b9d0
commit b292e2f512
42 changed files with 1038 additions and 624 deletions

View File

@@ -71,6 +71,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
{
m_alreadySent = FALSE;
m_needParent = TRUE;
m_acceptsFocus = TRUE;
PreCreation( parent, id, pos, size, style, name );
@@ -282,6 +283,27 @@ int wxRadioBox::FindString( const wxString &s ) const
return -1;
}
void wxRadioBox::SetFocus()
{
wxCHECK_RET( m_widget != NULL, "invalid radiobox" );
if (m_boxes.GetCount() == 0) return;
wxNode *node = m_boxes.First();
while (node)
{
GtkToggleButton *button = GTK_TOGGLE_BUTTON( node->Data() );
if (button->active)
{
gtk_widget_grab_focus( GTK_WIDGET(button) );
return;
}
node = node->Next();
}
}
void wxRadioBox::SetSelection( int n )
{
wxCHECK_RET( m_widget != NULL, "invalid radiobox" );