Why doesn’t a RichEdit display the last line added?

Posted on 1999-07-27
Medium Priority
Last Modified: 2013-11-22
I want to see the last line added to a Richedit. How do I accomplish this?

When using Richedit1.Lines.Add(), it only displays the top lines, and I want to see the end of the pag.
Question by:volavy
  • 2
LVL 17

Accepted Solution

inthe earned 40 total points
ID: 1391392
you have to do something like this when adding the line.
procedure TForm1.Button1Click(Sender: TObject);
SendMessage(Richedit1.Handle,  { HWND of the richedit Control }
             WM_VSCROLL,    { Windows Message }
             SB_LINEDOWN,   { Scroll Command }
             0)             { Not Used }  

there is also SB_LINEUP,SB_PAGEUP,SB_PAGEDOWN ETC..Look in the win32 help file for more.
Regards Barry

Author Comment

ID: 1391393
Tanks it works, but isn’t there another way to do this e.g. change a property value? Why doesn’t Richedit behave like a Memo?
LVL 17

Expert Comment

ID: 1391394
sorry there is no other propertys to change..
maybe richedit98 supports it im not sure but it is just richedit normal behavoior.
a memo is just like a multiline edit control.
there is also a richedit1.scrollby(x,y) method which could be used..

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

607 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