Board index » delphi » scrolling text: TMemo?

scrolling text: TMemo?

I have a large amount of text that I want to display, and to scroll upwards
slowly, at about one line per second.

I'm using TMemo, which displays the text just fine, and which has optional
scrollbars so that the user can scroll the text manually.

How can I get the text to scroll automatically?  TMemo doesn't seem to have
a method like ScrollUp or TopLine that I can call from a timing routine.

Is there a better component than TMemo?  Is there some way of simulating a
keypress to make TMemo think the user has pushed the up-arrow?

Any help with this problem would be greatly appreciated.

Thanks,

Richard Murray

 

Re:scrolling text: TMemo?


Quote
In article <8b2u2o$7...@bornews.borland.com>, Richard Murray wrote:
> I have a large amount of text that I want to display, and to scroll upwards
> slowly, at about one line per second.

> I'm using TMemo, which displays the text just fine, and which has optional
> scrollbars so that the user can scroll the text manually.

> How can I get the text to scroll automatically?  TMemo doesn't seem to have
> a method like ScrollUp or TopLine that I can call from a timing routine.

Use a timer control and send a WM_VSCROLL message (or EM_LINESCROLL) to the
control from the OnTimer event. E.g.

   memo1.perform( EM_LINESCROLL, 0, 1 );

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads