nrico
asked on
Scrolling TRichEdit
How can I make the TRichEdit scroll along with the text when I automatically add lines to it:
RichEdit.Lines.Add('Blah') ;
??
RichEdit.Lines.Add('Blah')
??
ASKER
Wait, I forgot to tell the lines are added from a TEdit control, but I want the Edit to keep focus (It's for a chat program -- My friends wanted colors in it :-). So I'd have to keep switching focus, right?
No you wouldn't have to change focus all the time. infact you don't have to use setfocus at all.
Rob;-)
Rob;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi,
another way (sample)
you can use this to scroll one line
//Scroll Up
procedure TForm1.Button1Click(Sender : TObject);
begin
richedit1.Perform(EM_SCROL L,SB_LINEU P,0);
end;
//Scroll Down
procedure TForm1.Button2Click(Sender : TObject);
begin
richedit1.Perform(EM_SCROL L,SB_LINED OWN,0);
end;
meikl
another way (sample)
you can use this to scroll one line
//Scroll Up
procedure TForm1.Button1Click(Sender
begin
richedit1.Perform(EM_SCROL
end;
//Scroll Down
procedure TForm1.Button2Click(Sender
begin
richedit1.Perform(EM_SCROL
end;
meikl
Thank you, glad to be of service :)
GL
Mike
GL
Mike
then each time you add, use:
SendMessage(RichEdit.Handl
Rob;-)