]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/scrolbar.cpp
typo fixes
[wxWidgets.git] / src / univ / scrolbar.cpp
index e2f146b7d42f1d7e270f74545f21c7c65c47fde1..66d0d7a1735bc7d4c93c545a45bcd5ee0e1416dd 100644 (file)
@@ -42,6 +42,7 @@
 #include "wx/univ/renderer.h"
 #include "wx/univ/inphand.h"
 #include "wx/univ/theme.h"
+#include "wx/log.h"
 
 #define WXDEBUG_SCROLLBAR
 
@@ -164,6 +165,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
 // ----------------------------------------------------------------------------
@@ -370,7 +389,7 @@ void wxScrollBar::UpdateThumb()
         }
 #endif // WXDEBUG_SCROLLBAR
 
-                    Refresh(TRUE, &rect);
+                    Refresh(FALSE, &rect);
                 }
 
                 m_elementsState[n] &= ~wxCONTROL_DIRTY;