delphitrichedit

How to prevent auto-scrolling of a focused TRichEdit when adding new lines?


I'm having a TRichEdit control into which I'm continuously adding lines. The problem is that when the control is focused, it automatically scrolls to the end whenever a line is added.

How can I stop the scrollbar to move to the end when lines are added? How to prevent auto-scrolling of a focused TRichEdit when adding new lines?


Solution

  • Remove focus from the RichEdit to stop the auto-scrolling, set focus to the RichEdit to start auto-scrolling.