?
Solved

Move botton of a TMemo or TRichEdit

Posted on 2011-03-24
3
Medium Priority
?
505 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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 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