在Inno设置向导的顶部面板中显示图像,而不是页面标题和说明

时间:2016-07-31 12:38:06

标签: inno-setup

我想在向导顶部的空间中放置一个图像,如图所示。并隐藏页面标题和说明。

enter image description here

1 个答案:

答案 0 :(得分:5)

用图片覆盖MainPanel并隐藏其所有其他组件(WizardSmallBitmapImagePageDescriptionLabelPageNameLabel):

[Files]
Source: "rainbow.bmp"; Flags: dontcopy

[Code]

procedure InitializeWizard();
var
  BitmapImage: TBitmapImage;
begin
  ExtractTemporaryFile('rainbow.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}\rainbow.bmp'));

  WizardForm.WizardSmallBitmapImage.Visible := False;
  WizardForm.PageDescriptionLabel.Visible := False;
  WizardForm.PageNameLabel.Visible := False;
end;

Rainbow Wizard

另见How to hide the main panel and show an image over the whole page?
Inno Setup - Transparency under text in page name and description labels