Solved

Showing the BOTTOM of TMemo text

Posted on 2003-11-06
3
265 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
URL for downloading Google Chrome for Win XP 2 232
Convert a string into a TDateTime 5 72
Adoquery sql  left join does not work 25 103
How to make Sign in, using Clientdataset? 1 33
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 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