RichEdit text colors
Hi,
Could someone please help me with this. With the following code,
clicking button1 repeatedly adds blue text. But if I click button2
(delete first line of text) then click button1 again the text is black
for the first click. Why is this going back to the default color
(black)? How can I be sure I'll get the text colors I want in a
richedit???
Thanks,
Dave
-------------------------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
begin
Richedit1.SelAttributes.Color:=clBlue;
Richedit1.Lines.Add('Some Text');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Richedit1.Lines.Delete(0);
end;
-------------------------------------------------------------------------