VCL Delphi

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;
//Seçilmiş kısmı RichEditten silmek
RichEdit1.ClearSelection;