Solved

Move botton of a TMemo or TRichEdit

Posted on 2011-03-24
3
501 Views
Last Modified: 2012-05-11
I use the following code to fill in a TRichEdit with some text lines (Object is either a TMemo or a TRichEdit component)

     Object.Lines.Add(Text]);
     SendMessage(Object.Handle,WM_VSCroll,SB_LINEDOWN,0);

If Text comes visually on one single line, it's okay
But if it comes on several line (longer that the object width), then the text is not entirely visible at the botton
How can I really force it to be ?
0
Comment
Question by:LeTay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 500 total points
ID: 35207047
use this
Object.Perform(WM_VSCROLL,SB_BOTTOM,SB_THUMBTRACK)

or
SendMessage(Object.Handle, EM_SCROLLCARET, 0, 0);
0
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35207057

or even simpler

SendMessage(Object.Handle, EM_LINESCROLL, 0, Object.Lines.Count);
0
 

Author Closing Comment

by:LeTay
ID: 35207224
Exactly what I was looking for !
Many thanks !
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 183
tvirtualstringtree freeze when load too manny images 10 80
Graphics32 under Delphi 10.1 Berlin 2 125
RESTRequest Parameter 4 53
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 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