InnoSetup:如何在组件描述中添加换行符 [英] InnoSetup: How to add line break into component description
问题描述
我正在尝试在组件说明的中间添加换行符.但是我似乎找不到合适的语法.
[Components]
Name: Component A; Description: "This is component A:" + NewLine + "My component A has this stuff";
>不支持换行符c0> 部分条目,但您可以通过代码修改组件项目描述(不幸的是,对存储描述的属性的访问已建立索引,并且无法通过组件名称找到索引).>
此示例显示如何修改第一个组件项的描述(索引从0开始),以及如何向其添加换行符:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
[Components]
Name: "app"; Description: "Description is changed in [Code] section"
Name: "readme"; Description: "Readme File"
[Code]
procedure InitializeWizard;
begin
WizardForm.ComponentsList.ItemCaption[0] :=
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed id venenatis' + #13#10 +
'erat, ac vehicula sapien. Etiam convallis ligula eros, in ullamcorper turpis' + #13#10 +
'pulvinar sit amet.';
end;
I am trying to add a line break in the middle of my description for my components. But I can't seem to find the proper syntax for it.
[Components]
Name: Component A; Description: "This is component A:" + NewLine + "My component A has this stuff";
Line breaks are not supported for [Components]
section entries, but you can modify your component item descriptions from code (unfortunately, access to the property, which stores a description is indexed and there is no way to find an index by the component name).
This example shows how to modify the first component item's description (indexing is 0 based), and how to add a line break to it:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
[Components]
Name: "app"; Description: "Description is changed in [Code] section"
Name: "readme"; Description: "Readme File"
[Code]
procedure InitializeWizard;
begin
WizardForm.ComponentsList.ItemCaption[0] :=
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed id venenatis' + #13#10 +
'erat, ac vehicula sapien. Etiam convallis ligula eros, in ullamcorper turpis' + #13#10 +
'pulvinar sit amet.';
end;
这篇关于InnoSetup:如何在组件描述中添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!