From 5985c07ce09572f2c7822ebca004d84154d3a6e8 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 16 Feb 2006 11:26:03 +0000 Subject: [PATCH] Allow tabbing in wxRadioBox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/radiobox.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 0e06bba68b..ae6caf1937 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -72,6 +72,20 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_ if (!rb->m_hasVMT) return FALSE; if (g_blockEventsOnDrag) return FALSE; + if ( ((gdk_event->keyval == GDK_Tab) || + (gdk_event->keyval == GDK_ISO_Left_Tab)) && + rb->GetParent() && (rb->GetParent()->HasFlag( wxTAB_TRAVERSAL)) ) + { + wxNavigationKeyEvent new_event; + new_event.SetEventObject( rb->GetParent() ); + // GDK reports GDK_ISO_Left_Tab for SHIFT-TAB + new_event.SetDirection( (gdk_event->keyval == GDK_Tab) ); + // CTRL-TAB changes the (parent) window, i.e. switch notebook page + new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) ); + new_event.SetCurrentFocus( rb ); + return rb->GetParent()->GetEventHandler()->ProcessEvent( new_event ); + } + if ((gdk_event->keyval != GDK_Up) && (gdk_event->keyval != GDK_Down) && (gdk_event->keyval != GDK_Left) &&