Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make an installer with text that is formatted (Partially Bold) in Inno Setup?

Anyone saw GOG.com game installer? How to make welcome text string like there including Path and Need Size in a single Caption? Where part of is bolded.

Here are examples of how changes String line breaking after modifying install path

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

enter image description here

enter image description here

like image 230
Gocha Avatar asked Jan 30 '12 18:01

Gocha


1 Answers

You can use a TRichEditViewer setting the RFTText property and the UseRichEdit to True.

Try this sample

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;

enter image description here

like image 59
RRUZ Avatar answered Sep 19 '22 09:09

RRUZ