Solved

Showing the BOTTOM of TMemo text

Posted on 2003-11-06
3
258 Views
Last Modified: 2010-04-05
I have a TMemo with a lot of text already loaded into it, so that it has a scrollbar when it appears to the user. Is there some quick way I can have the BOTTOM of the text visible, with the scrollbar pushed all the way down of course, when the user first sees the TMemo?

Martin
0
Comment
Question by:MartinC
3 Comments
 
LVL 2

Accepted Solution

by:
Ray_Adams earned 60 total points
ID: 9699344
    SendMessage(Memo1.Handle,EM_LINESCROLL,0,Memo1.lines.count);
---
Use this toi scrol to the end of Memo control.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9699367
or

procedure TForm1.Button2Click(Sender: TObject);
begin
  memo1.SelStart := length(memo1.Text);  //caret to end
  memo1.Perform(EM_SCROLLCARET,0,0)      //caret in view
end;

meikl ;-)
0
 

Author Comment

by:MartinC
ID: 9699391
Thanks Ray ... it worked. kretschmar's prolly does too, but Ray's is first.

Points!

Funny how every time I think there MUST be a native Delphi command to do something it turns out there isn't!

Martin
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now