How to scroll to the end of a TMemo or TRichEdit in Delphi
This is a simple one, but I had to look it up.
So, by my self imposed rules, I have to post it.
This text will constantly scroll memo-like-fields to the end.
DELPHI:
-
Memo1.SelStart:=Length(Memo1.Text);
-
Memo1.SelLength:=0;
-
SendMessage(Memo1.Handle, EM_SCROLLCARET, 0, 0);
This allows you to have an active logging component at the bottom of a form. Proof of concept coming soon.
















The code on getting to the end or in my case the beginning of a TMemo was helpful. I was manually populating a TMemo and having trouble finding how to get to the beginning for the user to view properly.
Thanks,
Comment by Bob — March 13, 2008 @ 9:32 am