Hello,
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
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.
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 ?
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
for i := 1 to 5 do
advmemo1.Lines.Add('line'+i.ToString);
advmemo1.CurY := advmemo1.Lines.Count - 1;
advmemo1.CurX := Length(advmemo1.Lines[advmemo1.Lines.Count - 1]);
end;
Cursor shows at the last character on the last line.
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