gpt4 book ai didi

installation - 在 inno 设置安装程序中显示多行内容的控件

转载 作者:行者123 更新时间:2023-12-04 02:13:14 25 4
gpt4 key购买 nike

我想在安装程序的安装步骤中显示如下图所示的内容...我已使用备忘录来显示内容..但备忘录不是合适的控件..因为如果用户将注意力集中在备忘录上,它看起来像一个文本框字段...见下图..当用户进入这一步时,第一个备忘录字段被选中... installation type

最佳答案

使用 TLabel TNewStaticText 组件( TNewStaticText 似乎是 InnoSetup 内部的首选)并将其设置如下:

  • WordWrap属性(property)给 True
  • AutoSize属性(property)给 False

  • 然后只需将组件拉伸(stretch)到您想要的位置,文本将适合该边界,就像本示例中所示:
    [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;

    结果:

    enter image description here

    关于installation - 在 inno 设置安装程序中显示多行内容的控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11718831/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com