- wxNavigationKeyEvent new_event;
- new_event.SetEventObject( focus );
- new_event.SetDirection( !event.ShiftDown() );
- /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
- new_event.SetWindowChange( event.ControlDown() );
- new_event.SetCurrentFocus( focus );
- handled = focus->GetEventHandler()->ProcessEvent( new_event );
- if ( handled && new_event.GetSkipped() )
- handled = false ;
+ wxWindow* iter = focus->GetParent() ;
+ while( iter && !handled )
+ {
+ if ( iter->HasFlag( wxTAB_TRAVERSAL ) )
+ {
+ wxNavigationKeyEvent new_event;
+ new_event.SetEventObject( focus );
+ new_event.SetDirection( !event.ShiftDown() );
+ /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
+ new_event.SetWindowChange( event.ControlDown() );
+ new_event.SetCurrentFocus( focus );
+ handled = focus->GetParent()->GetEventHandler()->ProcessEvent( new_event );
+ if ( handled && new_event.GetSkipped() )
+ handled = false ;
+ }
+ iter = iter->GetParent() ;
+ }