Add additional controls to standard Inno Setup pages?

天涯浪子 提交于 2021-02-18 18:46:37

问题


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

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


回答1:


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;



来源:https://stackoverflow.com/questions/65532874/add-additional-controls-to-standard-inno-setup-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!