autoscrolling memo in delphi

Does delphi contain a component that allows auto scroll text loaded from db, like in news sites?

Tt's for a delphi 7 application and requires a vertical scrolling.


None of those solutions for scrolling worked for me in the RichEdit memo. Using Delphi 2010 + w7. But this one works perfectly:

After every Lines.Add('...') this follows:

SendMessage(RichEditMemo.Handle, WM_VSCROLL, SB_LINEDOWN, 0);

Found in:

For such a simple task, you don't need to buy a commercial component! All you need to do is to send an EM_LINESCROLL message to that memo control, to make it scroll to the last line:

procedure ScrollToLastLine(Memo: TMemo);
  SendMessage(Memo.Handle, EM_LINESCROLL, 0,Memo.Lines.Count);

If your memo is read-only to users and is updated automatically by the application, you can put a call to the above procedure in its OnChange event-handler, so that whenever the text inside the memo is changed, it is automatically scrolled down to the last line.

Possibly, to save you some money you could adapt this to scroll a DBMemo:

EchoMemo.Lines.Add('A Line of text or more');
EchoMemo.SelStart := EchoMemo.GetTextLen;
EchoMemo.SelLength := 0;
EchoMemo.ScrollBy(0, EchoMemo.Lines.Count);

I use for a log display.

Need Your Help

IPython notebook to slides: Reveal is not defined

javascript ipython-notebook reveal.js

I'm using nbconvert to make a reveal.js slideshow from my notebook. Specifically, I'm running: ipython nbconvert --to slides analysis.ipynb. This creates "analysis.slides.html", and I put "reveal.j...

Full outer join with one selected table

sql oracle sqlplus

I have a complex select statement in my query which I am using three times, for outer joins. I would like to simplify it to use the complex query once, but this doesn't work:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.