Inno Setup:调整卸载进度表及其所有组件的大小

Inno Setup: Resize uninstall progress form with all its components

嘿,我需要增加 Inno Setup 卸载程序 UninstallProgressForm 的宽度和高度。

当我根据我自定义的安装程序向导页面宽度和高度手动更改其宽度和高度时,卸载进度表出现怪异。

唯一改变的是它的宽度和高度。卸载进度条、标题、说明、详细信息、按钮等所有其他组件均保留其旧的默认大小。

我想知道如何调整所有组件的大小。

提前致谢。

更新问题

它有一个 Strectched WizardSmallBitmapImage ,一个 Applogo (it is also a bitmap) ,还有更长的 cancel button.

我也喜欢在我的 UninstallProgressPage 中加入这些。

如何调整 UninstallProgressForm 中的组件大小,使其与 Installing Page 中的组件大小相似?

感谢您的帮助。

您必须一个接一个地增加所有 window 个组件的大小或移动位置。有关组件列表,请参阅 TUninstallProgressForm class:

的定义
TUninstallProgressForm = class(TSetupForm)
  property OuterNotebook: TNewNotebook; read;
  property InnerPage: TNewNotebookPage; read;
  property InnerNotebook: TNewNotebook; read;
  property InstallingPage: TNewNotebookPage; read;
  property MainPanel: TPanel; read;
  property PageNameLabel: TNewStaticText; read;
  property PageDescriptionLabel: TNewStaticText; read;
  property WizardSmallBitmapImage: TBitmapImage; read;
  property Bevel1: TBevel; read;
  property StatusLabel: TNewStaticText; read;
  property ProgressBar: TNewProgressBar; read;
  property BeveledLabel: TNewStaticText; read;
  property Bevel: TBevel; read;
  property CancelButton: TNewButton; read;
end;

代码可以是这样的:

const
  DeltaX = 150;
  DeltaY = 50;

procedure IncWidth(Control: TControl);
begin
  Control.Width := Control.Width + DeltaX;
end;

procedure IncHeight(Control: TControl);
begin
  Control.Height := Control.Height + DeltaY;
end;

procedure IncLeft(Control: TControl);
begin
  Control.Left := Control.Left + DeltaX;
end;

procedure IncTop(Control: TControl);
begin
  Control.Top := Control.Top + DeltaY;
end;

procedure IncWidthAndHeight(Control: TControl);
begin
  IncWidth(Control);
  IncHeight(Control);
end;

procedure InitializeUninstallProgressForm();
begin
  IncWidthAndHeight(UninstallProgressForm);
  IncWidth(UninstallProgressForm.Bevel);
  IncLeft(UninstallProgressForm.CancelButton);
  IncTop(UninstallProgressForm.CancelButton);
  IncWidthAndHeight(UninstallProgressForm.OuterNotebook);
  IncWidthAndHeight(UninstallProgressForm.InnerPage);
  IncWidth(UninstallProgressForm.Bevel1);
  IncWidthAndHeight(UninstallProgressForm.InnerNotebook);
  IncWidth(UninstallProgressForm.ProgressBar);
  IncWidth(UninstallProgressForm.StatusLabel);
  IncWidth(UninstallProgressForm.MainPanel);
  IncLeft(UninstallProgressForm.WizardSmallBitmapImage);
  IncWidth(UninstallProgressForm.PageDescriptionLabel);
  IncWidth(UninstallProgressForm.PageNameLabel);
  IncTop(UninstallProgressForm.BeveledLabel);
end;


另见 How to change wizard size (width and height) in an Inno Setup installer?