Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=My Program
- AppVersion=1.5
- DefaultDirName={pf}\My Program
- OutputDir=userdocs:Inno Setup Examples Output
- [Components]
- Name: "file1"; Description: "File 1"
- Name: "file2"; Description: "File 2"
- Name: "file3"; Description: "File 3"
- [Code]
- procedure ComponentsClickCheck(Sender: TObject);
- var
- Item1: Integer;
- Item2: Integer;
- Item3: Integer;
- ListBox: TNewCheckListBox;
- begin
- ListBox := TNewCheckListBox(Sender);
- Item1 := ListBox.Items.IndexOf('File 1');
- Item2 := ListBox.Items.IndexOf('File 2');
- Item3 := ListBox.Items.IndexOf('File 3');
- if (Item1 <> -1) and (Item2 <> -1) and (Item3 <> -1) then
- begin
- if (ListBox.ItemIndex >= 0) and (ListBox.ItemIndex <= 1) then
- ListBox.Checked[Item3] := ListBox.Checked[Item1] or ListBox.Checked[Item2]
- else
- begin
- ListBox.Checked[Item1] := ListBox.Checked[Item3];
- ListBox.Checked[Item2] := ListBox.Checked[Item3];
- end;
- end;
- end;
- procedure InitializeWizard;
- begin
- WizardForm.ComponentsList.OnClickCheck := @ComponentsClickCheck;
- end;
Advertisement
Add Comment
Please, Sign In to add comment