Change font and font size on wizard page information text box in Inno Setup - inno-setup

I need to change the font and probably the font size on the wizard page "Information" for the text box where the text is displayed specified via the parameter InfoBeforeFile in section [Languages]. The reason for changing the font is that the file content displayed in the text box is produced using a monospaced font like Courier New.
In the Inno Setup Help I looked through Support Classes References to find an answer but I was unsuccessful.
Thanks for any help!

Set the Font property of WizardForm.InfoBeforeMemo.
[Code]
procedure InitializeWizard();
begin
WizardForm.InfoBeforeMemo.Font.Name := 'Courier New';
end;

Related

Hide Inno Setup wizard small image

Is it possible to hide/remove/not show the small wizard image in top right corner:
I know there are WizardSmallImageFile and WizardSmallBitmapImage directives, but I can only set to a specific file, I can't set to none or something similar to tell compiler to not show any image there, at all.
Hide the WizardSmallBitmapImage control:
[Code]
procedure InitializeWizard();
begin
WizardForm.WizardSmallBitmapImage.Visible := False;
end;

Scale radio button list with font size in Inno Setup

When trying to apply a custom installation mask with radio buttons (I used code provided in Replace installation types dropdown list by radio buttons) I see I am unable to use higher fonts as a little spacing should be needed between one radio button field and another one. To give you a visual example:
As default font size are not so easy to be read I wonder if there is a way of adding extra spacing between one radio button field and the next one.
Checkboxes and Radio buttons created on runtime in Inno Setup do not scale their height automatically with a DPI/font size.
So you have to scale them programmatically.
...
RadioButton.Left := WizardForm.TypesCombo.Left;
RadioButton.Height := ScaleY(RadioButton.Height);
RadioButton.Top := WizardForm.TypesCombo.Top + I * RadioButton.Height;
...
The ScaleY(RadioButton.Height) takes the default combobox/radiobutton height, which is designed for the default font and no display scaling (100%) and scales that to the custom font and actual display scaling.
Though note that using a non-default font-size for your application/setup is not a good idea. The user should choose a font size he/she is comfortable with in Windows preferences. You should not override his/her choice.
When changing the font size, do not modify the shared default.isl, use the [LangOptions] section of your project file instead:
[LangOptions]
DialogFontSize=20

Why does the wizard form header change when the isxdl plugin downloading page is shown?

I'm using the following lines to change the MainPanel color and WizardSmallBitmapImage image:
[Setup]
WizardSmallImageFile=MyFile.bmp
[Code]
procedure InitializeWizard;
begin
WizardForm.MainPanel.Color := $00FFDBBF;
end;
In my setup I'm using the isxdl plugin for downloading prerequisites and the problem is that when its downloading progress page is shown, the MainPanel and WizardSmallBitmapImage components change their look back to the default as I've tried to illustrate on this picture:
Why does the wizard form header change when the isxdl plugin downloading page is shown and how to keep the modified look of the page header even for this page ?
The root of this problem lies deep inside the isxdl plugin which draws its own header, so what you see on that page is not Inno Setup's MainPanel and WizardSmallBitmapImage but elements drawn by that plugin, hardcoded in its source code.
In my view it would be unecessarily overcomplicated (if even possible) to intercept that plugin's window proc for overdrawing those elements with their actual look (in a response to the WM_PAINT message), so I would suggest you either building your own version of that plugin, or switching to a different plugin, e.g. Inno Download Plugin which is also easy to use and which doesn't break the wizard look.

Inno Setup - How can I put a message on the welcome page

Can I put a message on the Inno Setup Welcome page? I would like something like this
You can change the text of the welcome message by overriding the value on the [Messages] section:
[Messages]
WelcomeLabel2=This will install [name/ver] on your computer.%n%nIt is recommended that you close all other applications and disable any anti virus before continuing.
If you want to change the style (colour, size, etc) then you will need to create and position the controls individually in the InitializeWizard() event function.
#Deanna answer is the correct one.
Now, if you also want to change the font colour and format you can do:
[Messages]
WelcomeLabel2=This will install [name/ver] on your computer.%n%nIt is recommended that you close all other applications and disable any anti virus before continuing.
[Code]
procedure InitializeWizard();
begin
WizardForm.WelcomeLabel2.Font.Style := [fsBold]; //Bold
WizardForm.WelcomeLabel2.Font.Color := clRed; // And red colour
end;

Modifying the color scheme for an Inno Setup Installer

I've been playing around with Inno Setup 5.3.6; trying to customize the installers colors. Mainly the banner that appears at the head of the installer. But as of yet i have no luck finding a way of doing this easily.
After reading through the documentation I found the BackColor, BackColor2, BackColorDirection and BackSolid parameter. But giving them different values has as of yet not given me any visual change whatsoever.
Quick example of what I'm trying to do
[Setup]
AppName=My Program
AppVerName=My Program version 1.4
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
BackColor=$E6B13A
BackColor2=$E5B13A
BackSolid=no
BackColorDirection=lefttoright
What I'm wondering is, does anyone know what colors BackColor and BackColor2 actually modifies? And if there is no simple way of changing the colors; is there any way to modify the upper banners color gradient programmatically using the [Code] segment?
The four parameters are described in the Cosmetic section of the documentation of the [Setup] section in the Inno Setup help. They do what you would expect, but not for the gradient in the upper area of the setup wizard, but for the background window that was customary a few years ago. This is considered legacy, but can be enabled by setting
[Setup]
...
WindowVisible=yes
(the default value is no). You can try this to see it in action, but IMO you shouldn't enable this for your installations unless you want them to look rather dated.
As for the top area of the wizard: It is not meant to have a gradient. If you use a tool like Spy++ to check the window hierarchy of the wizard, or open the Wizard.dfm.txt text file from the Inno Setup sources, you will find that there is a window of the class TPanel with the colour set to the default window colour (clWindow if you know Delphi, or the result of calling GetSysColor() with the COLOR_WINDOW constant). This is a solid colour, which you can change easily by adding this to your [Code] section:
procedure InitializeWizard();
begin
WizardForm.MainPanel.Color := clYellow;
end;
I don't think it is possible with the current Inno Setup versions to draw a gradient on this panel, because the panel itself has no canvas to draw on, and the TPaintBox class which could maybe be created in the right place and be used to draw the gradient isn't available (see list of classes in the "Support Classes Reference" section of the documentation).
this is an old question, but someone might stumble here like i did. The most elegant way to change the inno setup color schemes is by using a 3rd party tool called ISSkin

Resources