Inno Setup的 - 替换缺省下/后退/取消按钮 [英] Inno Setup - replace default next/back/cancel buttons
本文介绍了Inno Setup的 - 替换缺省下/后退/取消按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一种方法来添加自己的按钮,向导页/删除Inno Setup的现有的。那可能吗?
I need a way to add my own buttons to wizard pages/remove existing ones in Inno Setup. Is that possible?
推荐答案
是的,这是可能的:
[code]
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('This is a demo of how to create a button!', mbInformation, mb_Ok);
end;
procedure CreateAboutButton(ParentForm: TSetupForm; CancelButton: TNewButton);
var
AboutButton: TNewButton;
begin
AboutButton := TNewButton.Create(ParentForm);
AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := CancelButton.Width;
AboutButton.Height := CancelButton.Height;
AboutButton.Caption := '&About...';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := ParentForm;
end;
procedure InitializeWizard();
begin
CreateAboutButton(WizardForm, WizardForm.CancelButton);
end;
有关更多的例子,拿在\\ Program Files文件一看codeClasses.iss示例脚本\\ Inno Setup的5 \\例子。
For more examples, take a look at the CodeClasses.iss example script in \program files\inno setup 5\examples.
这篇关于Inno Setup的 - 替换缺省下/后退/取消按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文