Recent

Author Topic: How scroll down memo ?  (Read 12281 times)

seba22

  • Full Member
  • ***
  • Posts: 136
How scroll down memo ?
« on: December 28, 2009, 01:57:49 pm »
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
Quote
SendMessage(Memo1.handle, EM_SCROLLCARET,0,0);

But doesn't compile..
Than i try another:
Quote
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:
Quote
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 ?


theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1890
Re: How scroll down memo ?
« Reply #1 on: December 28, 2009, 03:09:42 pm »

seba22

  • Full Member
  • ***
  • Posts: 136
Re: How scroll down memo ?
« Reply #2 on: December 28, 2009, 05:36:50 pm »
Yes, yes yes..

Your method went for first fire but without success.
It don't want scroll all text.

I attach video, to get better problem. (Ubuntu 9.10 Gnome).

View My Video


Regards