Inno setup 如何通过更改inno设置脚本在空白处的欢迎页面中添加新文本?

Inno setup 如何通过更改inno设置脚本在空白处的欢迎页面中添加新文本?,inno-setup,Inno Setup,在inno安装程序的欢迎屏幕上,我想在“单击下一步继续,或单击取消退出安装”行下方的空白区域添加新的_文本 但只能通过覆盖[Messages]部分上的值,在“单击下一步继续,或取消退出安装”行上方添加新文本: [Messages] WelcomeLabel2=This will install [name/ver] on your computer.%n%nIt is recommended that you close all other applications before continu

在inno安装程序的欢迎屏幕上,我想在“单击下一步继续,或单击取消退出安装”行下方的空白区域添加新的_文本

但只能通过覆盖
[Messages]
部分上的值,在“单击下一步继续,或取消退出安装”行上方添加新文本:

[Messages]
WelcomeLabel2=This will install [name/ver] on your computer.%n%nIt is recommended that you close all other applications before continuing %n%n NEW_TEXT.
截图:


我可以通过编辑inno安装脚本在上面指定的空白区域添加文本吗

您可以降低延伸至页面底部的
WelcomeLabel2
的高度,并创建自己的静态文本控件,例如:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[CustomMessages]
WelcomeLabel3=Hello world!

[Code]
var
  WelcomeLabel3: TNewStaticText;

procedure InitializeWizard;
begin
  // you can set e.g. the fixed height to the original WelcomeLabel2, or
  // you can set the WelcomeLabel2 to auto-size to the text content it's
  // showing; to set the fixed height, use the following line:
  // WizardForm.WelcomeLabel2.Height := 97;
  WizardForm.WelcomeLabel2.AutoSize := True;

  // now you got some space on the welcome page, so let's fill it up with
  // your own label called WelcomeLabel3
  WelcomeLabel3 := TNewStaticText.Create(WizardForm);
  WelcomeLabel3.Parent := WizardForm.WelcomePage;
  WelcomeLabel3.AutoSize := False;
  WelcomeLabel3.Left := WizardForm.WelcomeLabel2.Left;
  WelcomeLabel3.Top := WizardForm.WelcomeLabel2.Top +
    WizardForm.WelcomeLabel2.Height;
  WelcomeLabel3.Width := WizardForm.WelcomeLabel2.Width;
  WelcomeLabel3.Height := WizardForm.WelcomePage.Height - WelcomeLabel3.Top;
  WelcomeLabel3.Font.Assign(WizardForm.WelcomeLabel2.Font);
  WelcomeLabel3.Caption := CustomMessage('WelcomeLabel3');

  // these three lines can help you to see the label composition since it
  // colorize them; remove this when you'll be done
  WizardForm.WelcomeLabel1.Color := clYellow;
  WizardForm.WelcomeLabel2.Color := $000080FF;
  WelcomeLabel3.Color := clRed;
end;

您也可以简单地更改
单击下一步
消息,如下所示:

[Messages]
ClickNext=Click Next to continue, or Cancel to exit Setup.%n%nADD YOUR TEXT HERE

非常感谢您的帮助,这是一个完美的解决方案,并且解释得很清楚。谢谢。我能看到的唯一问题是,您必须覆盖您使用的所有语言的消息。另外,请不要使用答案与他人联系(用户不会得到通知)。这就是评论的目的。谢谢@Robert,这也是一个不错的选择,但只有在不需要对新添加的文本进行格式化的情况下。在格式化的情况下,如将文本加粗或着色,我们必须使用[CustomMessages],如前一个答案所述。