Scroll TRichEdit to last line.

I have a TRichEdit and I wanna scroll it so the last line is visible using the OnChange event.

Anyone?
PsylordAsked:
Who is Participating?
 
shenqwConnect With a Mentor Commented:
procedure TForm1.RichEdit1Change(Sender: TObject);
begin
  RichEdit1.SelStart:=Length(RichEdit1.Lines.Text);
  RichEdit1.Perform(EM_ScrollCaret,0,0);
end;
0
 
PsylordAuthor Commented:
Excellent. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.