![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Set RichEdit font parameters
Use SelAttributes.Style method of RichEditComponent. You may set bold, italic, underline, strikeout style and other parameters of font in RichEdit.And don't forget to return focus to RichEdit component.
procedure TForm1.Button1Click(Sender: TObject);
begin
if fsBold in RichEdit1.SelAttributes.Style then
RichEdit1.SelAttributes.Style:=
RichEdit1.SelAttributes.Style-[fsBold]
else
RichEdit1.SelAttributes.Style:=
RichEdit1.SelAttributes.Style+[fsBold];
RichEdit1.SetFocus;
end;
-
More for developers