How to stop automatic scrolling of a Memo control?

On Windows 7, the recording control ( TMemo ) will automatically scroll after entering text ( Memo.Lines.Add(Path); ), which I don’t want, because the scrolling is done independently.

How to stop auto scrolling?

+6
source share
1 answer

Typically, adding text to a notebook controls the note at the bottom of the pasted text. To prevent this, call Lines.BeginUpdate before adding text and call EndUpdate after this:

 procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.BeginUpdate; try Memo1.Lines.Add('...'); Memo1.Lines.Add('...'); ... finally Memo1.Lines.EndUpdate; end; end; 
+6
source

All Articles