Allow tabbing to the windows inside non-notebook wxBookCtrl

Remove wxBookCtrlBase::AcceptsFocus() returning false as it didn't make
any sense: even though wxBookCtrlBase doesn't, indeed, accept focus on
itself, it does accept it for its children and returning false prevented
the focus from ever getting inside it.

This fixes, for example, keyboard navigation in a window containing
wxSimplebook and TAB can now be used to move to the controls inside it
from the outside.

Also remove the now unnecessary AcceptsFocus() override which was just
undoing the damage of the base class method and is not needed any more.
This commit is contained in:
Vadim Zeitlin 2018-01-18 22:20:58 +01:00
parent c6e445d40c
commit 4839932227
2 changed files with 0 additions and 7 deletions

View File

@ -228,9 +228,6 @@ public:
// we do have multiple pages
virtual bool HasMultiplePages() const wxOVERRIDE { return true; }
// we don't want focus for ourselves
virtual bool AcceptsFocus() const wxOVERRIDE { return false; }
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }

View File

@ -139,10 +139,6 @@ public:
// new is wxNOT_FOUND)
void SendPageChangedEvent(int nPageOld, int nPageNew = wxNOT_FOUND);
// wxBookCtrlBase overrides this method to return false but we do need
// focus because we have tabs
virtual bool AcceptsFocus() const wxOVERRIDE { return wxControl::AcceptsFocus(); }
#if wxUSE_EXTENDED_RTTI
// XTI accessors
virtual void AddPageInfo( wxNotebookPageInfo* info );