]> git.saurik.com Git - wxWidgets.git/commitdiff
Scroll text into view when typing
authorJulian Smart <julian@anthemion.co.uk>
Thu, 2 Feb 2006 13:05:30 +0000 (13:05 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 2 Feb 2006 13:05:30 +0000 (13:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index b2c74d0b398b8eb991a9eb6df0e2e4ca5efebb2d..5bdad6e5846acb81042fc928b507d971309df340 100644 (file)
@@ -454,6 +454,8 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
 
         EndBatchUndo();
         SetDefaultStyleToCursorStyle();
 
         EndBatchUndo();
         SetDefaultStyleToCursorStyle();
+
+        ScrollIntoView(m_caretPosition, WXK_RIGHT);
     }
     else if (event.GetKeyCode() == WXK_BACK)
     {
     }
     else if (event.GetKeyCode() == WXK_BACK)
     {
@@ -483,6 +485,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
             SetDefaultStyleToCursorStyle();
         }
 
             SetDefaultStyleToCursorStyle();
         }
 
+        ScrollIntoView(m_caretPosition, WXK_LEFT);
     }
     else if (event.GetKeyCode() == WXK_DELETE)
     {
     }
     else if (event.GetKeyCode() == WXK_DELETE)
     {
@@ -524,6 +527,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
         EndBatchUndo();
 
         SetDefaultStyleToCursorStyle();
         EndBatchUndo();
 
         SetDefaultStyleToCursorStyle();
+        ScrollIntoView(m_caretPosition, WXK_RIGHT);
     }
 #if 0
     else
     }
 #if 0
     else