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
This commit is contained in:
Vadim Zeitlin
2002-09-19 20:40:50 +00:00
parent db74b98be8
commit ead7e5c1bf

View File

@@ -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()