用于在inno设置安装程序中显示多行内容的控件 [英] Control for showing multiline content in inno set up installer
问题描述
我想在安装程序的安装步骤中显示如下图所示的内容...我使用了备忘录来显示内容.但是备忘录不是适当的控件.因此如果用户将焦点放在文本框上,则它看起来像一个文本框在备注字段上...参见下图..当用户进入此步骤时,选择第一个备注字段...
I want to show the content like in below image in installation step of installer...i have used memo for showing the content..but memo is not appropriate control..as then it looks like a textbox if user puts focus on the memo field... see below image.. when user comes to this step,the first memo field is selected...
推荐答案
使用 TLabel
或 TNewStaticText
组件( TNewStaticText
似乎(最好在InnoSetup内部使用),并对其进行以下设置:
Use either TLabel
or TNewStaticText
component (the TNewStaticText
seems to be preferred inside of InnoSetup) and set it the following:
-
True
的WordWrap
属性 -
AutoSize
的AutoSize
属性
- the
WordWrap
property toTrue
- the
AutoSize
property toFalse
然后将组件拉伸到所需位置,文本将适合该范围,如本示例所示:
Then just stretch the components into your desired positions and the text will fit to that bounds, just like shown in this example:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
[Code]
const
LoremIpsum =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin mauris ' +
'lorem, ullamcorper sit amet tincidunt ac, varius at ante. Aenean pretium, ' +
'tortor non congue pharetra, ante urna consectetur mi, vitae congue arcu est ' +
'eleifend nisl.';
procedure InitializeWizard;
var
CustomPage: TWizardPage;
StandardDescLabel: TLabel;
StandardRadioButton: TNewRadioButton;
AdvancedDescLabel: TLabel;
AdvancedRadioButton: TNewRadioButton;
begin
CustomPage := CreateCustomPage(wpWelcome, 'Installation type', '');
StandardRadioButton := TNewRadioButton.Create(WizardForm);
StandardRadioButton.Parent := CustomPage.Surface;
StandardRadioButton.Checked := True;
StandardRadioButton.Top := 16;
StandardRadioButton.Width := CustomPage.SurfaceWidth;
StandardRadioButton.Font.Style := [fsBold];
StandardRadioButton.Font.Size := 9;
StandardRadioButton.Caption := 'Standard Installation'
StandardDescLabel := TLabel.Create(WizardForm);
StandardDescLabel.Parent := CustomPage.Surface;
StandardDescLabel.Left := 8;
StandardDescLabel.Top := StandardRadioButton.Top + StandardRadioButton.Height + 8;
StandardDescLabel.Width := CustomPage.SurfaceWidth;
StandardDescLabel.Height := 40;
StandardDescLabel.AutoSize := False;
StandardDescLabel.Wordwrap := True;
StandardDescLabel.Caption := LoremIpsum;
AdvancedRadioButton := TNewRadioButton.Create(WizardForm);
AdvancedRadioButton.Parent := CustomPage.Surface;
AdvancedRadioButton.Top := StandardDescLabel.Top + StandardDescLabel.Height + 16;
AdvancedRadioButton.Width := CustomPage.SurfaceWidth;
AdvancedRadioButton.Font.Style := [fsBold];
AdvancedRadioButton.Font.Size := 9;
AdvancedRadioButton.Caption := 'Advanced Installation'
AdvancedDescLabel := TLabel.Create(WizardForm);
AdvancedDescLabel.Parent := CustomPage.Surface;
AdvancedDescLabel.Left := 8;
AdvancedDescLabel.Top := AdvancedRadioButton.Top + AdvancedRadioButton.Height + 8;
AdvancedDescLabel.Width := CustomPage.SurfaceWidth;
AdvancedDescLabel.Height := 40;
AdvancedDescLabel.AutoSize := False;
AdvancedDescLabel.Wordwrap := True;
AdvancedDescLabel.Caption := LoremIpsum;
end;
结果:
这篇关于用于在inno设置安装程序中显示多行内容的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!