X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21c3670fecfba15df37ade5fd4fb47829e399caa..b5a49d4c5267d4eb933d45ec615ac2ed374750dc:/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 // ----------------------------------------------------------------------------