在Inno Setup向导的顶部面板中显示图像,而不是页面标题和描述 [英] Display image in top panel of Inno Setup wizard instead of page title and description

查看:173
本文介绍了在Inno Setup向导的顶部面板中显示图像,而不是页面标题和描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将图像放在向导顶部的空间中,如图所示.并隐藏页面标题和描述.

I want to put an image in the space on the top of the wizard, as shown in the picture. And hide the page title and description.

推荐答案

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

Cover the MainPanel with an image and hide all its other components (WizardSmallBitmapImage, PageDescriptionLabel and PageNameLabel):

[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;
  { Needed for WizardStyle=modern in Inno Setup 6. Must be removed in Inno Setup 5. }
  BitmapImage.Anchors := [akLeft, akTop, akRight, akBottom];
  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;



另请参阅:

  • 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
  • Adjust Inno Setup MainPanel to banner image size

这篇关于在Inno Setup向导的顶部面板中显示图像,而不是页面标题和描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆