Fix tab navigation bug with radio boxes without enabled items.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Jul 2013 12:44:33 +0000 (12:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Jul 2013 12:44:33 +0000 (12:44 +0000)
commitbd6ca54f63b93ae047e1039a46b91d6a8f4e5bf9
treeac94ce71e8daa3ac873f356bd4d46f60214e356a
parentdee22e3198c17e325ff4862520aec104d40b9948
Fix tab navigation bug with radio boxes without enabled items.

There was a bug similar to the one in the preceding commit with radio boxes
under wxMSW too: if all radio box buttons were disabled (or hidden, although
this should be much more rare in practice, unlike the disabled case which was
deemed to be rare in r74583 commit message but turned out to actually happen),
the radio box still pretended to accept focus but didn't really do it.

Fix this by allowing to override wxWindow::CanBeFocused() and do it in
wxRadioBox to check whether we have any enabled visible items.

Also add a check for CanBeFocused() to wxControlContainer code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/containr.h
include/wx/msw/radiobox.h
include/wx/window.h
src/msw/radiobox.cpp