views:

278

answers:

2

Hi.

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?

+3  A: 

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).

mghie
+1  A: 

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

joshuatree