Код:
[Setup]
AppName=My Program
AppVerName=My Program
DefaultDirName={pf}\My Program
DirExistsWarning=no
DisableProgramGroupPage=yes
DisableWelcomePage=yes
DisableDirPage=yes
DisableReadyPage=yes
[ Code]
var
ISCustomPage1: TWizardPage;
CheckListBox2: TNewCheckListBox;
CheckListBox1: TNewCheckListBox;
procedure make1(Sender: TObject);
begin
if CheckListBox1.Checked[0] = true then
begin
CheckListBox2.TreeViewStyle := true;
CheckListBox2.Checked[0] := false;
end
else
begin
CheckListBox2.TreeViewStyle := false;
CheckListBox2.Checked[0] := true;
end;
end;
procedure plus1(Sender: TObject);
begin
if CheckListBox2.Checked[0] = true then
begin
CheckListBox1.TreeViewStyle := true;
CheckListBox1.Checked[0] := false;
end
else
begin
CheckListBox1.TreeViewStyle := false;
CheckListBox1.Checked[0] := true;
end;
end;
procedure InitializeWizard();
begin
ISCustomPage1 := CreateCustomPage(wpWelcome, 'Test', 'Description');
WizardForm.Color := clWhite;
WizardForm.InnerPage.Color := clWhite;
ISCustomPage1.Surface.Color := clWhite;
WizardForm.NextButton.Hide;
CheckListBox2 := TNewCheckListBox.Create(WizardForm);
with CheckListBox2 do
begin
Name := 'CheckListBox2';
Parent := ISCustomPage1.Surface;
Left := ScaleX(0);
Top := ScaleY(100);
Width := ScaleX(417);
Height := ScaleY(100);
DragMode := dmAutomatic;
OnClickCheck := @plus1;
TreeViewStyle := True;
BorderStyle := bsNone;
AddCheckBoxEx('CheckBox_0', 'c01 00', 0, True, True, True, True, nil, True);
AddRadioButtonEx('RadioButton_1', 'r21 02', 1, True, True, nil, True);
AddRadioButtonEx('RadioButton_2', 'r22 03', 1, True, True, nil, True);
AddRadioButtonEx('RadioButton_3', 'r31 04', 1, True, True, nil, True);
AddRadioButtonEx('RadioButton_4', 'r32 05', 1, True, True, nil, True);
AddCheckBoxEx('CheckBox_4.1', 'c17 18', 2, True, True, False, True, nil, True);
end;
CheckListBox1 := TNewCheckListBox.Create(WizardForm);
with CheckListBox1 do
begin
Name := 'CheckListBox1';
Parent := ISCustomPage1.Surface;
Left := ScaleX(0);
Top := ScaleY(0);
Width := ScaleX(417);
Height := ScaleY(100);
OnClickCheck := @make1;
BorderStyle := bsNone;
AddCheckBoxEx('CheckBox_0', 'c01 00', 0, True, True, True, True, nil, True);
AddCheckBoxEx('CheckBox_0', 'c01 00', 1, True, True, True, True, nil, True);
AddCheckBoxEx('CheckBox_0', 'c01 00', 2, True, True, True, True, nil, True);
AddCheckBoxEx('CheckBox_0', 'c01 00', 2, True, True, True, True, nil, True);
AddCheckBoxEx('CheckBox_0', 'c01 00', 2, True, True, True, True, nil, True);
AddCheckBoxEx('CheckBox_4.1', 'c17 18', 2, True, True, False, True, nil, True);
end;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
end;