DefAttributes
SelAttributes
SelStart
SelLength
This example requires a TRichEdit and a TButton. Leave the default text, usually "RichEdit1", in the lines property. The DefAttributes will apply to this text.
procedure TForm1.Button1Click(Sender: TObject);
begin
with RichEdit1.SelAttributes do
begin
Color := clRed;
Height := Height + 5;
end;
RichEdit1.Lines.Add('This line of text will be red.';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RichEdit1.DefAttributes.Color := clBlue;
RichEdit1.DefAttributes.Style := [fsBold, fsItalic];
end;
Tu mélanges, tu secous et t'oublis pas et ça va roulez
---------------
Des bons sites pour Delphi? http://forum.hardware.fr/forum2.php3?post=16838&cat=10 -- informaticien -- http://www.z0rglub.com/phpwebgallery/ -- Delphi :love: