AdvMemo auto scroll

can you tell how to keep the memo view always on the last added text lines ? as an autoscroll.
Until now I have used the standard VCL TMemo which seems to work in this way as default.
But with AdvMemo seems the default is to keep view on the first lines, or better it keeps on the current line, without scrolling after adding lines.
Can you explain the difference between Scroll mode, Auto and Strict ?
because not found on manual.


There is at this moment not a built-in auto scroll mode that would do this automatically. But at application level, you can programmatically control the vertical scroll position using the property AdvMemo.TopLine

ah ok. I'll add as suggested feature :-)
Can you explain the difference between ScrollMode, Auto and Strict ?

ScrollMode applies to how the memo is scrolling to the cursor X,Y position.
smAuto is a smoother way that keeps the X,Y position as centered as possible.
ssStrict sets the scroll position to the last last line, last column when X,Y is out of memo view area.

Thank you !

Hi again,
I am unable to set the Cursor on the last line, last column, to append single chars without adding carriage return...
Setting CurY seems work, but CurX keep on value Zero...(?)
Any to suggest ?


I could not see an issue here.
Example test code:

procedure TForm1.FormCreate(Sender: TObject);
  i: integer;
  for i := 1 to 5 do

  advmemo1.CurY := advmemo1.Lines.Count - 1;
  advmemo1.CurX := Length(advmemo1.Lines[advmemo1.Lines.Count - 1]);

Cursor shows at the last character on the last line.

1 Like

Ah, I did an error calculating the Length of last line...
result was oversized, thus the assignment to CurX was resetted to zero...
Thanks for patience

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.