TFontStyle (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example demonstrates how to set and clear font styles. This example requires a button and a label that has text with styles set.

Code

procedure TForm1.Button1Click(Sender: TObject);
begin
   Label1.Font.Style := [fsBold, fsUnderline];
end;
{
This code demonstrates how to clear any 
styles that were previously set.
procedure TForm1.Button2Click(Sender: TObject);
begin
   Label1.Font.Style := [];
end;

Uses