Fórum exemplo rápido #279143
27/04/2005
0
pessoal, to precisando meio rápido, se puderem me ajudar, de um exemplo onde mude a cor de fonte, negrito e coisas desse tipo de um DBRicheEdit.
valeu gente!
valeu gente!
Rfpsatin
Curtir tópico
+ 0
Responder
Posts
27/04/2005
Motta
do help
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;
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;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)