Главная страница | назад





Article #27022: How do I get a TRichEdit to scroll in code?

Question:

How do I get a TRichEdit to automatically scroll down as I add new lines?

Answer:

This functionality is included in a TMemo but not a TRichEdit. You just need to add one line of code to get it to scroll down:

begin
RichEdit1.Lines.Add('New text');
RichEdit1.Perform(EM_SCROLL,SB_LINEDOWN,0);
end;

Last Modified: 06-MAR-01