In Delphi the following code would make a TMemo scroll to a specific location, in this case the 5th line from the top.
with Memo1 do
begin
SelStart := Perform(EM_LINEINDEX, 5, 0);
Perform(EM_SCROLLCARET, 0, 0);
end;
In Kylix TMemo.Perform doesn't exist. Any suggestions on how to do this would be appriciatied.
You might try:
var Cp:TCaretPos;
...
Cp.Col:=0;
Cp.Line:=5;
SampleMemo.CaretPos:=Cp;
This ensures that the cursor position is visible.
Or you might take a TSynEdit (or TSynMemo) for more control. (see
Topline property)
Jim