且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Inno Setup在wpPreparing页面上放置控件

更新时间:2023-12-06 09:49:04

wpPreparing 不是对象,只是一个数字常量.

The wpPreparing is not an object, it's just a numerical constant.

WizardForm.PreparingPage 包含对准备安装"页面的引用.请注意,它已经是 TNewNotebookPage 类型,而不是 TWizardPage 类型.因此,您可以直接将其用作父项.

The WizardForm.PreparingPage holds a reference to the "Preparing to Install" page. Note that it is of type TNewNotebookPage already, not TWizardPage. So you use it directly as a parent.

还请注意, StatusLabel 位于安装"页面上.您可能想将新标签关联到 PreparingLabel .

Also note that the StatusLabel is on the "Installing" page. You probably want to relate your new label to the PreparingLabel instead.

并且您必须创建 UninstallingLabel .

UninstallingLabel := TNewStaticText.Create(WizardForm);

with UninstallingLabel do
begin
  Caption := 'Uninstalling existing version...';
  Left := WizardForm.PreparingLabel.Left;
  Top := WizardForm.PreparingLabel.Top;
  Parent := WizardForm.PreparingPage;
end;


尽管您确实要遮蔽 PreparingLabel (因为使用其坐标).

如何重用它呢?

WizardForm.PreparingLabel.Caption := 'Uninstalling existing version...';