[ wxwindows-Bugs-1643391 ] wxStaticBoxSizer interferes with the TAB navigation on Mac

SourceForge.net noreply at sourceforge.net
Wed Jan 24 02:48:08 PST 2007


Bugs item #1643391, was opened at 2007-01-24 12:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1643391&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMac specific
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Climent Luchianov (climentml)
Assigned to: Stefan Csomor (csomor)
Summary: wxStaticBoxSizer interferes with the TAB navigation on Mac

Initial Comment:
Context:
wxMac 2.8.0 stable, Mac OS X 10.4.8 Tiger, XCode 2.4, GCC 4.0.1
Multiple controls in a wxDialog, some of them inside a wxStaticBoxSizer. TAB navigation set using wxWindow::MoveAfterInTabOrder.

On Windows(XP, SP2), TAB navigation works correctly, however, on Mac it doesn't (more exactly, it won't cycle, the tab order will be the right one).

Apparently, the reason for this inconsistent behavior is due to the fact that inside the 

wxControlContainer::HandleOnNavigationKey, the call :

child->AcceptsFocusFromKeyboard() 

will return false on Windows and true on Mac when the wxStaticBox associated with the wxStaticBoxSizer is reached inside the loop.

This happens because on Windows the wxStaticBox is derived from wxStaticBoxBase which will return false for AcceptsFocus(), while on Mac, wxStaticBox is derived from wxControl, which will return true if the control is shown and is enabled.

Maybe having on Mac the wxStaticBox derive also from wxStaticBoxBase as it is on Windows, will fix this, but I didn't look into it. 

A quick workaround in my case was disabling the associated wxStaticBox of a wxStaticBoxSizer so that AcceptsFocus returns false. As a consequence, the TAB navigation was restored.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1643391&group_id=9863




More information about the wx-dev mailing list