使用Inno Setup中格式化(部分粗体)的文本制作安装程序?

Goc*_*cha 5 delphi scripting pascal inno-setup

有人看过GOG.com游戏安装程序吗?如何在单个标题中创建包含路径和需要大小的欢迎文本字符串?部分是粗体的.

以下是修改安装路径后如何更改String换行的示例

http://i.stack.imgur.com/VKbtE.jpg

在此输入图像描述

在此输入图像描述

RRU*_*RUZ 17

您可以使用属性TRichEditViewer设置RFTTextUseRichEditTrue.

试试这个样本

procedure CreateCustomPages;
var
  Page                 : TWizardPage;
  rtfHelpText          : TRichEditViewer;
  s: string;
begin
 Page := CreateCustomPage(wpWelcome, 'Custom wizard page controls', 'Bold Demo');
 Page.Surface.Align:=alCLient;

 s:='{\rtf1\ansi\ansicpg1252\deff0\deflang13322{\fonttbl{\f0\fnil\fcharset0 Tahoma;}}'+
    '\viewkind4\uc1\pard\f0\fs16 This is a normal text, \b and this is a bold text\b0\par}';

 rtfHelpText := TRichEditViewer.Create(Page);
 rtfHelpText.Parent := Page.Surface;
 rtfHelpText.Left :=    0;
 rtfHelpText.Top := 0;
 rtfHelpText.Width := Page.SurfaceWidth;
 rtfHelpText.Height := Page.SurfaceHeight;
 rtfHelpText.Scrollbars := ssVertical;
 rtfHelpText.ReadOnly := True;
 rtfHelpText.UseRichEdit := True;
 rtfHelpText.RTFText := s;
end;

procedure InitializeWizard();
begin
  CreateCustomPages();
end;
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

  • @WarrenP:是的,这没问题(`rtfHelpText.BorderStyle:= bsNone`).OP可能还想要`rtfHelpText.Color:= clBtnFace`.(恕我直言,没有边框,但clWindow背景看起来很可怕!) (2认同)