unit TFontStyle;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: TFontStyle
// Property: Graphics.TFont.Style
// Type: Graphics.TFontStyle

// BeginCode
{
This example demonstrates how to set and clear font styles.
This example requires a button and a label that has text
with some styles set.
} 
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;
// EndCode
// EndExample: TFontStyle
end.
