So I got this in my .iss file:
[Files]
Source: "WizModernImageTop2.bmp"; Flags: dontcopy
[Code]
function CloneStaticTextToLabel(StaticText: TNewStaticText): TLabel;
begin
Result := TLabel.Create(WizardForm);
Result.Parent := StaticText.Parent;
Result.Left := StaticText.Left;
Result.Top := StaticText.Top;
Result.Width := StaticText.Width;
Result.Height := StaticText.Height;
Result.AutoSize := StaticText.AutoSize;
Result.ShowAccelChar := StaticText.ShowAccelChar;
Result.WordWrap := StaticText.WordWrap;
Result.Font := StaticText.Font;
StaticText.Visible := False;
WizardForm.PageDescriptionLabel.Font.Color := clRed;
WizardForm.PageNameLabel.Font.Color := clRed;
end;
var
PageDescriptionLabel: TLabel;
PageNameLabel: TLabel;
procedure InitializeWizard;
var
BitmapImage: TBitmapImage;
begin
ExtractTemporaryFile('WizModernImageTop2.bmp');
BitmapImage := TBitmapImage.Create(WizardForm);
BitmapImage.Parent := WizardForm.MainPanel;
BitmapImage.Width := WizardForm.MainPanel.Width;
BitmapImage.Height := WizardForm.MainPanel.Height;
BitmapImage.Stretch := True;
BitmapImage.AutoSize := False;
BitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizModernImageTop2.bmp'));
WizardForm.WizardSmallBitmapImage.Visible := True;
WizardForm.PageDescriptionLabel.Visible := True;
WizardForm.PageNameLabel.Visible := True;
{ Create TLabel equivalent of standard TNewStaticText components }
PageNameLabel := CloneStaticTextToLabel(WizardForm.PageNameLabel);
PageDescriptionLabel := CloneStaticTextToLabel(WizardForm.PageDescriptionLabel);
end;
procedure CurPageChanged(CurPageID: Integer);
begin
{ Update the custom TLabel components from the standard hidden components }
PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
end;
What I want to achieve:
Change colour/size (where needed) of PageNameLabel and PageDescriptionLabel to white so to become visible. Right now its black on black. I don't know the font parameters for the WizardForm elements, eh...
UPDATE: If anyone is wiling to use an image in his installer instead displaying the small WizardSmallImage icon to the right, use the provided code above, it makes it so labels are displayed on top of the image with transparency enabled. It requires Unicode version of Inno to work.