Ahora ya tan sólo me falta saber el color
Código Delphi [-]
procedure TForm1.SelectFont(Sender :TObject);
begin
FontDialog1.Font.Assign(RichEdit1.SelAttributes);
if (FontDialog1.Execute) then
begin
RichEdit1.SelAttributes.Color:=FontDialog1.Font.Color;
RichEdit1.SelAttributes.Name:=FontDialog1.Font.Name;
RichEdit1.SelAttributes.Size:=FontDialog1.font.Size;
RichEdit1.SelAttributes.Style:=FontDialog1.Font.Style;
end;
edit1.text:= RichEdit1.SelAttributes.Name;
edit2.Text:=intTostr(FontDialog1.font.Size);
if (fsBold in RichEdit1.SelAttributes.Style) then edit3.text:='negrita';
if (fsItalic in RichEdit1.SelAttributes.Style) then edit3.text:='cursiva';
if (fsUnderline in RichEdit1.SelAttributes.Style) then edit3.text:='subrayado';
RichEdit1.SetFocus;
end;
Última edición por marcoszorrilla fecha: 25-05-2005 a las 19:22:36.
|