Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add additional controls to standard Inno Setup pages?

How to add checkbox to the folder selection dialog created by the Inno Setup which is shown below in the image?

enter image description here

This is not a custom dialog. It is created by the Inno Setup automatically.

like image 420
Codename K Avatar asked Dec 02 '25 09:12

Codename K


1 Answers

Set the Parent property of the checkbox to the WizardForm.SelectDirPage:

var
  Checkbox: TNewCheckBox;

procedure InitializeWizard();
begin
  Checkbox := TNewCheckBox.Create(WizardForm.SelectDirPage);
  Checkbox.Parent := WizardForm.SelectDirPage;
  Checkbox.Top := WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + ScaleY(8);
  Checkbox.Left := WizardForm.DirEdit.Left;
  Checkbox.Caption := 'My checkbox';
  // See https://stackoverflow.com/q/30469660/850848
  Checkbox.Height := ScaleY(Checkbox.Height);
end;

enter image description here


For finding the page names, see:
Inno Setup built-in control names

For placing controls on a custom page, see:
Placing image/control on Inno Setup custom page

like image 104
Martin Prikryl Avatar answered Dec 04 '25 13:12

Martin Prikryl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!