且构网

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

在Inno Setup中的WizardForm页面上更改标签文本

更新时间:2023-12-03 10:20:58

安装程序向导表单的所有组件都已公开.

标签为ReadyLabel,而不是ReadyLabel2a. ReadyLabel2a是消息的ID.安装程序将ReadyLabel2aReadyLabel2b消息用于ReadyLabel,具体取决于安装程序配置.

 WizardForm.ReadyLabel.Caption := 'BLAH';
 

请参见 TWizardForm类声明.>


您可以在 Inno Setup源代码

中找到如何在控件中使用消息. >

如果您需要某些标准消息的安装程序特定文本,请使用 Messages部分:

[Messages]
ReadyLabel2a=Click Install to continue with the installation, or click Back if you want to review or change any settings.

I want to change (in code) the text of certain labels on the WizardForm of the installer which are NOT exposed by the WizardForm.

Example:

ReadyLabel2a=Click Install to continue with the installation, or click Back if you want to review or change any settings.

I cannot do WizardForm.ReadyLabel2a.Caption := 'BLAH'; as the compiler complains about unknown identifier ReadyLabel2a.

Is there a way to do it?

Thanks

All components of the installer wizard form are exposed.

The label is ReadyLabel, not ReadyLabel2a. The ReadyLabel2a is ID of the message. The installer uses either message ReadyLabel2a or ReadyLabel2b for the ReadyLabel, depending on the setup configuration.

WizardForm.ReadyLabel.Caption := 'BLAH';

See TWizardForm class declaration.


You can find how the messages are used in controls in Inno Setup source code


If you need to have an installer specific texts for certain standard messages, modify the texts using Messages section:

[Messages]
ReadyLabel2a=Click Install to continue with the installation, or click Back if you want to review or change any settings.