Hello,
I couldn't find any working example how can i scroll down memo1 in height. (I want see last added lines)
I was trying this one
SendMessage(Memo1.handle, EM_SCROLLCARET,0,0);
But doesn't compile..
Than i try another:
procedure TForm1.MemoScrollDown(Memo: TMemo);
var
ScrollMessage : TWMVScroll;
i : Integer;
begin
ScrollMessage.Msg:=WM_VScroll;
for i := 0 to Memo.Lines.Count do
begin
ScrollMessage.ScrollCode:=sb_LineDown;
ScrollMessage.Pos:=0;
Memo.Dispatch(ScrollMessage);
end;
end;
But it also, dont want compile:
unit1.pas(90,32) Error: method identifier expected
unit1.pas(91,26) Error: Identifier not found "TWMVScroll"
unit1.pas(91,26) Error: Error in type definition
unit1.pas(91,16) Error: Illegal qualifier
unit1.pas(91,31) Error: Identifier not found "WM_VScroll"
unit1.pas(91,17) Error: Illegal qualifier
unit1.pas(91,40) Error: Identifier not found "sb_LineDown"
unit1.pas(91,17) Error: Illegal qualifier
Any ideas ?