I need to scroll RichEdit to the very end after adding a row. I have this RichEdit in a separate form that I don’t want to focus at all. I tried the often suggested solution:
RichEdit.Lines.Add(someText);
RichEdit.SelStart:=RichEdit.GetTextLen;
SendMessage(RichEdit.handle, EM_SCROLLCARET, 0, 0);
But this does not work for me. However, when I focus RichEdit before calling SendMessagewith RichEdit.SetFocus;, it works fine. This, however, destroys my other application needs.
I am using XE2. Thanks
source
share