InnoSetup:如何在组件描述中添加换行符 [英] InnoSetup: How to add line break into component description

查看:267
本文介绍了InnoSetup:如何在组件描述中添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在组件说明的中间添加换行符.但是我似乎找不到合适的语法.

[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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆