[lazarus] How to scroll TMemo control in code
hernan.et at pg.com
hernan.et at pg.com
Thu Mar 27 17:43:37 EST 2003
Can anybody try help me figure out how to scroll the TMemo programatically?
I have seen this code in Delphi, though I am not sure if it works (in Delphi)
procedure MemoScrollDown(Memo: TMemo);
var
ScrollMessage:TWMVScroll; (I replace this one with TLMVScroll)
i:integer;
begin
ScrollMessage.Msg:=WM_VScroll; (this one with LM_VScroll)
for i := 0 to Memo.Lines.Count do
begin
ScrollMessage.ScrollCode:=sb_LineDown;
ScrollMessage.Pos:=0;
Memo.Dispatch(ScrollMessage);
end;
end;
If I try the above code, it does not do anything.
Yoyong
More information about the Lazarus
mailing list