Always make wxWindow::SetFocus() focus the window, overriding SetCanFocus, some more focus related docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-09-17 10:17:12 +00:00
parent 16a6b53ddc
commit 00ff24c81c
5 changed files with 85 additions and 59 deletions

View File

@@ -70,10 +70,9 @@ public:
// wxListCtrl) and so should get focus for ourselves
bool AcceptsFocusRecursively() const { return true; }
// call this when the number of children of the window changes
//
// note that we have any children, this panel (used just as container for
// them) shouldn't get focus for itself
// Call this when the number of children of the window changes.
// If we have any children, this panel (used just as container for
// them) shouldn't get focus for itself.
void UpdateCanFocus() { SetCanFocus(!HasAnyFocusableChildren()); }
protected:
@@ -177,7 +176,7 @@ protected:
\
void classname::SetFocusIgnoringChildren() \
{ \
basename::SetFocusIgnoringChildren(); \
basename::SetFocus(); \
}
#else // !wxHAS_NATIVE_TAB_TRAVERSAL