unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioGroup1: TRadioGroup;
    Label3: TLabel;
    Panel1: TPanel;
    procedure RadioGroup1Click(Sender: TObject);
    procedure RadioButton1Click(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.RadioButton1Click(Sender: TObject);
begin
  Panel1.Color:=clRed;
end;

procedure TForm1.RadioButton2Click(Sender: TObject);
begin
  Panel1.Color:=clGreen;
end;

procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
   case Radiogroup1.ItemIndex of
   0: Panel1.Color:=clRed;
   1: Panel1.Color:=clGreen;
   end;
end;

end.
