Inno setup 在InnoSetup中自定义完成页的内容
我想自定义我的完成页面,这样我就可以使用无线电控件让用户选择在完成页面后要应用的操作 我尝试了各种方法,例如Inno setup 在InnoSetup中自定义完成页的内容,inno-setup,Inno Setup,我想自定义我的完成页面,这样我就可以使用无线电控件让用户选择在完成页面后要应用的操作 我尝试了各种方法,例如 Page1:=CreateCustomPage(wpInfoAfter,'test','test') 及 Page1:=CreateCustomPage(wpFinished,'test','test') 但他们都没有给出我想要的结果 任何帮助都将不胜感激,谢谢 要自定义现有页面,您必须向ISS脚本中添加以下内容: 从头开始的代码,未编译: procedure CurPageChange
Page1:=CreateCustomPage(wpInfoAfter,'test','test')代码>
及
Page1:=CreateCustomPage(wpFinished,'test','test')代码>
但他们都没有给出我想要的结果
任何帮助都将不胜感激,谢谢
要自定义现有页面,您必须向ISS脚本中添加以下内容:
从头开始的代码,未编译:
procedure CurPageChanged(CurPageID: Integer);
var
MyMsg: TLabel;
begin
if (CurPageID <> wpFinished) then return;
MyMsg := TLabel.Create(WizardForm);
MyMsg.Parent := WizardForm.FinishedPage;
MyMsg.Caption := 'Hello World';
MyMsg.AutoSize := True;
end;
您期望的结果是什么?您得到的结果是什么?对于Page1:=CreateCustomPage(wpInfoAfter,'test','test');,在完成页面之前,我有一个自定义页面。对于第1页:=CreateCustomPage(wpFinished,'test','test');,没有添加任何内容。我希望我能做到。完全自定义完成页或2。在完成页面之前添加一个页面,然后去掉完成页面。我明白了,我明白了。只需调用CreateCustomPage(wpInfoAfter,'test','test');并实现disablefinishedpage您还可以使用过程CurPageChanged(CurPageID:Integer)修改wpfished;如果CurPageID=wpFinished,则开始//您的更改在此结束;结束
您只是盲目地复制了一些随机的Inno设置源代码,这在Inno设置代码部分是绝对不可用的。不能编写方法,只能编写构造函数。没有RegisterExistingPage
,SetFontNameSize
,等等@MartinPrikryl,如果我们谈论“方法2”,这只是在哪里挖掘的一般想法,仅此而已。这不是一个详细的食谱,如果我没有强调足够的话,很抱歉。“方法#1”绝对有效,唯一缺乏细节的是布局的相对位置,正如帖子中明确指出的那样。
constructor TWizardForm.Create(AOwner: TComponent);
begin
...
{ Initialize wpFinished page }
RegisterExistingPage(wpFinished, FinishedPage, nil, '', '');
SetFontNameSize(FinishedHeadingLabel.Font, LangOptions.WelcomeFontName,
LangOptions.WelcomeFontSize, '', 12);
FinishedHeadingLabel.Font.Style := [fsBold];
FinishedHeadingLabel.Caption := ExpandSetupMessage(msgFinishedHeadingLabel) + SNewLine;
AdjustLabelHeight(FinishedHeadingLabel);
FinishedLabel.Top := FinishedHeadingLabel.Top + FinishedHeadingLabel.Height;
YesRadio.Caption := SetupMessages[msgYesRadio];
NoRadio.Caption := SetupMessages[msgNoRadio];
RunList.MinItemHeight := ScalePixelsY(22);
...
end;