]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/scrlwing.cpp
Don't give focus to wxSearchButton when using keyboard navigation.
[wxWidgets.git] / src / generic / scrlwing.cpp
index c5329862e2e50d948be9675b2b251581ee2beef9..7c84a72e18616d048e0bc795c191cbc69aa26c87 100644 (file)
@@ -343,6 +343,8 @@ wxScrollHelperBase::wxScrollHelperBase(wxWindow *win)
     m_xScrollingEnabled =
     m_yScrollingEnabled = true;
 
+    m_kbdScrollingEnabled = true;
+
     m_scaleX =
     m_scaleY = 1.0;
 #if wxUSE_MOUSEWHEEL
@@ -844,6 +846,12 @@ void wxScrollHelperBase::HandleOnPaint(wxPaintEvent& WXUNUSED(event))
 // this they always have the priority
 void wxScrollHelperBase::HandleOnChar(wxKeyEvent& event)
 {
+    if ( !m_kbdScrollingEnabled )
+    {
+        event.Skip();
+        return;
+    }
+
     // prepare the event this key press maps to
     wxScrollWinEvent newEvent;
 
@@ -1103,7 +1111,7 @@ void wxScrollHelperBase::HandleOnChildFocus(wxChildFocusEvent& event)
     // part of a wxComboCtrl visible and the button would still be outside the
     // scrolled area.  But do so only if the parent fits *entirely* inside the
     // scrolled window. In other situations, such as nested wxPanel or
-    // wxScrolledWindows, the parent might be way to big to fit inside the
+    // wxScrolledWindows, the parent might be way too big to fit inside the
     // scrolled window. If that is the case, then make only the focused window
     // visible
     if ( win->GetParent() != m_targetWindow)