- bFound = WIN(node)->AcceptsFocus();
- }
- else {
- // just to be sure it's the right one
- wxASSERT( WIN(node)->AcceptsFocus() );
- }
-
- // find the next child which accepts focus
- while ( !bFound ) {
- node = bForward ? node->Next() : node->Previous();
- if ( node == NULL ) {
- // ask parent if he doesn't want to advance focus to the next panel
- if ( GetParent() != NULL ) {
- wxNavigationKeyEvent event;
- event.SetDirection(bForward);
- event.SetWindowChange(FALSE);
- event.SetCurrentFocus(this);
-
- if ( GetParent()->ProcessEvent(event) )
- return TRUE;
- }
-
- // wrap around
- node = bForward ? children->First() : children->Last();