Inno设置:调整卸载进度表及其所有组件

时间:2016-07-01 02:45:58

标签: inno-setup uninstall

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

当我根据我自定义设计的安装程序向导页面宽度和高度手动更改其宽度和高度时,卸载进度表格显得很奇怪。

只有改变的是它的宽度和高度。所有其他组件,如卸载进度条,标题,标题,详细信息,按钮都保留其旧的默认大小。

enter image description here

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

提前致谢。

更新的问题

 - This is an image of my Installing page.

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

我喜欢在我的UninstallProgressPage中添加这些内容。

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

感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

您必须逐个增加所有窗口组件的大小或移位。有关组件列表,请参阅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;

Larger uninstall window

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