Link to home
Start Free TrialLog in
Avatar of craig_capel
craig_capel

asked on

Richedit

Procedure BufferRichedit;
Begin
If Form1.RichEdit1.Lines.Count>=MaxLines Then
 begin
   While Form1.RichEdit1.Lines.Count>=MaxLines do
     Form1.RichEdit1.Lines.Delete(0);
  end;
End;

Where MaxLines>300 so as the chat fills up, to stop it from going on forever and ever, it deletes the top lines and then goes back to the bottom, it works - okish..

Problem is everytime it happens it flickers as it moves everything down, is there any other way of doing this? or even buffer it or something, place something on top of it so people do not see it refresh? any suggestions?

- Thanks

Craig C.
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MBo
MBo

Richedit1.Lines.BeginUpdate;
... your actions here
Richedit1.Lines.EndUpdate;