[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to get TRichedit to scroll

Posted on 2001-06-25
5
Medium Priority
?
170 Views
Last Modified: 2010-04-06
How do I make a richedit control automatically scroll as more lines are added to it?
0
Comment
Question by:zebada
[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
  • 3
5 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6225692
An easy way to do it would be like this

TRichedit.SelStart := Length(TRichedit.Text);


The Crazy One
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 200 total points
ID: 6225700
To scroll 3 lines down:

RichEdit1.Perform(EM_LineScroll, 0, 3);


To scroll 3 lines up:

RichEdit1.Perform(EM_LineScroll, 0, -3);
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6225712
Or

RichEdit1.Perform(EM_Scroll, SB_PAGEDOWN, 0);
RichEdit1.Perform(EM_Scroll, SB_PAGEUP, 0);
RichEdit1.Perform(EM_Scroll, SB_LINEDOWN, 0);
RichEdit1.Perform(EM_Scroll, SB_LINEUP, 0);
0
 
LVL 6

Author Comment

by:zebada
ID: 6230644
CrazyOne,
TRichedit.SelStart := Length(TRichedit.Text);
Doesn't seem to work when I am adding lines to the control in the OnActivate mehtod of the first form that is displayed by the application. i.e. before any user interaction has taken place. After that I don't need to do anything except give the control focus and it will follow (scroll) as I add ne lines.

Epsylon,
Thank-you your solution worked although on reading through some of the other messages I chose the EM_SCROLLCARET because I actually wanted to follow the cursor.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6230658
Glad I could help, Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

656 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