答案 0 :(得分:10)
这样的事情可能会成功。由于欢迎标签不支持透明度,因此您需要通过使用不同的类(具有透明度支持)创建自己的标签来解决此问题,继承父级,字体,文本和大小并隐藏原始标签。以下是脚本如何执行此操作:
[Code]
procedure InheritBoundsRect(ASource, ATarget: TControl);
begin
ATarget.Left := ASource.Left;
ATarget.Top := ASource.Top;
ATarget.Width := ASource.Width;
ATarget.Height := ASource.Height;
end;
procedure InitializeWizard;
var
TopWelcomeLabel: TLabel;
BottomWelcomeLabel: TLabel;
begin
WizardForm.WizardBitmapImage.Align := alClient;
WizardForm.WizardBitmapImage.Bitmap.LoadFromFile('D:\Image.bmp');
TopWelcomeLabel := TLabel.Create(WizardForm);
TopWelcomeLabel.Parent := WizardForm.WelcomeLabel1.Parent;
TopWelcomeLabel.Font := WizardForm.WelcomeLabel1.Font;
TopWelcomeLabel.Caption := WizardForm.WelcomeLabel1.Caption;
TopWelcomeLabel.WordWrap := WizardForm.WelcomeLabel1.WordWrap;
InheritBoundsRect(WizardForm.WelcomeLabel1, TopWelcomeLabel);
WizardForm.WelcomeLabel1.Visible := False;
BottomWelcomeLabel := TLabel.Create(WizardForm);
BottomWelcomeLabel.Parent := WizardForm.WelcomeLabel2.Parent;
BottomWelcomeLabel.Font := WizardForm.WelcomeLabel2.Font;
BottomWelcomeLabel.Caption := WizardForm.WelcomeLabel2.Caption;
BottomWelcomeLabel.WordWrap := WizardForm.WelcomeLabel2.WordWrap;
InheritBoundsRect(WizardForm.WelcomeLabel2, BottomWelcomeLabel);
WizardForm.WelcomeLabel2.Visible := False;
end;
结果:
答案 1 :(得分:0)
即使创建自定义页面,我担心您想要的内容可能也不可能或者相当困难。查看CreateCustomPage()函数以及Inno Setup安装中包含的示例脚本。