unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    RadioGroup1: TRadioGroup;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    Label1: TLabel;
    procedure RadioGroup1Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure CheckBox2Click(Sender: TObject);
    procedure CheckBox3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  kolor: TColor;
  rozmiar: integer;

implementation

{$R *.dfm}

procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
  case RadioGroup1.ItemIndex of
    0: Label1.Caption:='tekst pierwszy';
    1: Label1.Caption:='tekst drugi';
    2: Label1.Caption:='tekst trzeci';
    3: Label1.Caption:='tekst czwarty';
  end;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  if CheckBox1.Checked then Label1.Font.Color:=clRed
  else Label1.Font.Color:=kolor;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  kolor:=Label1.Font.Color;
  rozmiar:=Label1.Font.Size;
  RadioGroup1.ItemIndex:=0;
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
  if CheckBox2.Checked then Label1.Font.Style:=Label1.Font.Style+[fsUnderline]
  else Label1.Font.Style:=Label1.Font.Style-[fsUnderline];
  //lub fsBold, fsItalic, fsStrikeOut
end;

procedure TForm1.CheckBox3Click(Sender: TObject);
begin
  if CheckBox3.Checked then Label1.Font.Size:=16
  else Label1.Font.Size:=rozmiar;
end;

end.
