X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21c3670fecfba15df37ade5fd4fb47829e399caa..4a09bc4e34a16a5a608d7ae1dca60d29a1765f19:/src/univ/scrolbar.cpp diff --git a/src/univ/scrolbar.cpp b/src/univ/scrolbar.cpp index e2f146b7d4..464681e645 100644 --- a/src/univ/scrolbar.cpp +++ b/src/univ/scrolbar.cpp @@ -164,6 +164,24 @@ wxScrollBar::~wxScrollBar() { } +bool wxScrollBar::AcceptsFocus() const +{ + if (!wxWindow::AcceptsFocus()) return FALSE; + + wxWindow *parent = (wxWindow*) GetParent(); + + if (parent) + { + if ((parent->GetScrollbar( wxHORIZONTAL ) == this) || + (parent->GetScrollbar( wxVERTICAL ) == this)) + { + return FALSE; + } + } + + return TRUE; +} + // ---------------------------------------------------------------------------- // scrollbar API // ----------------------------------------------------------------------------