unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls;
type
{ TForm1 }
TForm1 =
class(TForm)
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckGroup1: TCheckGroup;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
GroupBox5: TGroupBox;
GroupBox6: TGroupBox;
procedure CheckBox1Change(Sender: TObject);
procedure CheckBox2Change(Sender: TObject);
procedure CheckBox3Change(Sender: TObject);
procedure CheckGroup1ItemClick(Sender: TObject;
Index: integer);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
CheckGroup1.Checked[0] := true;
CheckGroup1.Checked[1] := true;
CheckGroup1.Checked[2] := true;
end;
procedure TForm1.CheckGroup1ItemClick(Sender: TObject;
Index: Integer);
begin
case Index of
0: GroupBox1.Visible := CheckGroup1.Checked[0];
1: GroupBox2.Visible := CheckGroup1.Checked[1];
2: GroupBox3.Visible := CheckGroup1.Checked[2];
end;
end;
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
GroupBox4.Visible := CheckBox1.Checked;
end;
procedure TForm1.CheckBox2Change(Sender: TObject);
begin
GroupBox5.Visible := CheckBox2.Checked;
end;
procedure TForm1.CheckBox3Change(Sender: TObject);
begin
GroupBox6.Visible := CheckBox3.Checked;
end;
end.