Solved

Move botton of a TMemo or TRichEdit

Posted on 2011-03-24
3
503 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
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…

732 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