inno-setup - 在 inno 设置中更改自定义消息的文本字体
问题描述
有没有办法在 inno 设置中更改自定义消息的颜色?
这是我的测试代码
[Setup]
AppName=My Program
AppVersion=1.5
WizardStyle=modern
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
OutputDir=userdocs:Inno Setup Examples Output
CreateAppDir=False
[Components]
Name: "program"; Description: "{cm:mymessage}"
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
[CustomMessages]
mymessage=this is my message
关于我如何做到这一点的任何想法
我发现我可以使用消息 ID 更改消息,这样的东西可以用于自定义消息吗?
[Code]
procedure InitializeWizard();
begin
WizardForm.WelcomeLabel2.Font.Style := [fsBold]; //Bold
WizardForm.WelcomeLabel2.Font.Color := clRed; // And red colour
end;
解决方案
在 vanilla Inno Setup 中没有官方方法可以做到这一点。
最好说:只有更改源并重新编译 Inno 设置才有可能,因为将颜色分配给文本被忽略:
WizardForm.ComponentsList.Font.Color := clRed;
WizardForm.ComponentsList.Color := clBlue;
一些第 3 方扩展(图形安装程序- 我是它的开发人员)或修改后的 Inno Setup 版本允许这样做。
推荐阅读
- r - 编写一个循环来选择变量值的所有组合,在 R 中生成正方程值
- java - 如果实体与多对一或一对一或任何此类关联相关,Spring Data JPA 存储库的 findAll 功能是否会起作用?
- java - 杰克逊反序列化映射空值到空字符串
- android - 如何使 android.net.Uri 在查询参数之间编码 & 到 %26
- azure-devops - 等效于 Azure Devops 中的 teamcity.build.branch.is_default
- jsf - 隐藏警告消息 autoUpdate primefaces JSF
- vba - Worksheet_Change 防止添加行
- python - 带有动态验证码的 Scrapy
- java - Java - 忽略大小写的映射键查找
- php - 不支持删除到 /oauth/personal-access-tokens/token