How can I add new text on the welcome page in a blank space by changing the inno script setting?

on the welcome screen of the intro installation. I want to add NEW_TEXT to a blank area just below the line. Click Next to continue, or Cancel to exit the installer

But just to add NEW_TEXT above the line "click Next" to continue, or "Cancel to exit the installer", overriding the value in the section [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.

      

Screenshot:

enter image description here

Is it possible to add text to this blank area above by editing the inno setup script?

+3


source to share


2 answers


You can reduce the height WelcomeLabel2

that is stretched at the bottom of the page and create your own static text control, for example:



[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 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;

      

+2


source


You can also just change the message ClickNext

like this:



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

      

+2


source







All Articles