zebada
asked on
How to get TRichedit to scroll
How do I make a richedit control automatically scroll as more lines are added to it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or
RichEdit1.Perform(EM_Scrol l, SB_PAGEDOWN, 0);
RichEdit1.Perform(EM_Scrol l, SB_PAGEUP, 0);
RichEdit1.Perform(EM_Scrol l, SB_LINEDOWN, 0);
RichEdit1.Perform(EM_Scrol l, SB_LINEUP, 0);
RichEdit1.Perform(EM_Scrol
RichEdit1.Perform(EM_Scrol
RichEdit1.Perform(EM_Scrol
RichEdit1.Perform(EM_Scrol
ASKER
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.
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.
Glad I could help, Thanks.
TRichedit.SelStart := Length(TRichedit.Text);
The Crazy One