From ead7e5c1bf7d0f850634e38efc2334060771b2f9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 19 Sep 2002 20:40:50 +0000 Subject: [PATCH] force controls with wxTE_RICH2 style to scroll to the end in AppendText() (fixes bug 564526) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 9cb0a4f03a..ac0e8b75ff 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -722,6 +722,15 @@ void wxTextCtrl::AppendText(const wxString& text) SetInsertionPointEnd(); WriteText(text); + +#if wxUSE_RICHEDIT + if ( IsMultiLine() && GetRichVersion() > 1 ) + { + // setting the caret to the end and showing it simply doesn't work for + // RichEdit 2.0 -- force it to still do what we want + ::SendMessage(GetHwnd(), EM_LINESCROLL, 0, GetNumberOfLines()); + } +#endif // wxUSE_RICHEDIT } void wxTextCtrl::Clear()