Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/installation/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation 控件,用于在inno设置安装程序中显示多行内容_Installation_Inno Setup - Fatal编程技术网

Installation 控件,用于在inno设置安装程序中显示多行内容

Installation 控件,用于在inno设置安装程序中显示多行内容,installation,inno-setup,Installation,Inno Setup,我想在安装程序的安装步骤中显示如下图所示的内容…我使用了memo来显示内容..但memo不是合适的控件..因为如果用户将焦点放在memo字段上,它看起来就像一个文本框。。。见下图。。当用户执行此步骤时,将选择第一个备注字段…使用或组件(InnoSetup内部似乎首选)并将其设置为以下内容: 将WordWrap属性设置为True AutoSize属性设置为False 然后将组件拉伸到所需的位置,文本将适合该边界,如本例所示: [Setup] AppName=My Program AppVers

我想在安装程序的安装步骤中显示如下图所示的内容…我使用了memo来显示内容..但memo不是合适的控件..因为如果用户将焦点放在memo字段上,它看起来就像一个文本框。。。见下图。。当用户执行此步骤时,将选择第一个备注字段…

使用或组件(InnoSetup内部似乎首选)并将其设置为以下内容:

  • WordWrap
    属性设置为
    True
  • AutoSize
    属性设置为
    False
然后将组件拉伸到所需的位置,文本将适合该边界,如本例所示:

[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;
结果是:


使用
TLabel
TNewStaticText
并将
WordWrap
设置为True,将
AutoSize
设置为False。根据需要,无需将
AutoSize
设置为
False
。我刚刚测试了它,它似乎在
True
@Ignitor上的
AutoSize
上运行良好,我会把它保留在那里。当标签应该自动调整大小时,就是这种情况。正如文档中提到的,“每当文本更改时,标签的大小都会重新调整”,我正在更改它,不是吗?问题是需要什么:如果您不希望标签自动调整其高度,那么您可以将
自动调整大小
设置为
False
。即使使用
AutoSize:=TrueWordWarp
时,标签将不会调整其宽度。然而,我主要想指出的是,对于
wrap:=True
,没有必要设置
AutoSize:=False