像这样的事情可能会成功。由于欢迎标签不支持透明度,因此您需要通过使用不同的类(具有透明度支持)创建自己的标签来解决此问题,继承父级、字体、文本和大小并隐藏原始标签。这是如何执行此操作的脚本:
[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;
结果:
恐怕您想要的可能是不可能的,或者相当困难,即使创建自定义页面也是如此。查看 CreateCustomPage() 函数以及 Inno Setup 安装中包含的示例脚本。
此代码可以帮助您。只需更改欢迎页面,但您可以尝试安装程序的其他页面。
[code]
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
end;
function GetCustomSetupExitCode(): Integer;
begin
Result := 1;
end;
procedure InitializeWizard();
var
WLabel1, WLabel2,
FLabel1, FLabel2: TLabel;
begin
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedHeadingLabel.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.WizardBitmapImage.Width := 500;
WizardForm.WizardBitmapImage.Height := 315;
WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(176);
WLabel1.Top := ScaleY(16);
WLabel1.Width := ScaleX(301);
WLabel1.Height := ScaleY(54);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Font.Name := 'verdana';
WLabel1.Font.Size := 12;
WLabel1.Font.Style := [fsBold];
WLabel1.Font.Color:= clBlack;
WLabel1.ShowAccelChar := False;
WLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;
WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Top := ScaleY(76);
WLabel2.Left := ScaleX(176);
WLabel2.Width := ScaleX(301);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Font.Name := 'tahoma';
WLabel2.Font.Color:= clBlack;
WLabel2.ShowAccelChar := False;
WLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;
WizardForm.WizardBitmapImage2.Width := 500;
WizardForm.WizardBitmapImage2.Height := 315;
FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(176);
FLabel1.Top := ScaleY(16);
FLabel1.Width := ScaleX(301);
FLabel1.Height := ScaleY(54);
FLabel1.AutoSize := False;
FLabel1.WordWrap := True;
FLabel1.Font.Name := 'verdana';
FLabel1.Font.Size := 12;
FLabel1.Font.Style := [fsBold];
FLabel1.Font.Color:= clBlack;
FLabel1.ShowAccelChar := False;
FLabel1.Caption := WizardForm.FinishedHeadingLabel.Caption;
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;
FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(76);
FLabel2.Left := ScaleX(176);
FLabel2.Width := ScaleX(301);
FLabel2.Height := ScaleY(53);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Font.Name := 'tahoma';
FLabel2.Font.Color:= clBlack;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := WizardForm.FinishedLabel.Caption;
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;
end;
扩展TLama的答案,所以所有的功劳都归功于他,但以下代码将所有默认文本控件(TNewStatictext)转换为透明标签:
[Setup]
AppName=test
AppVersion=1
DefaultDirName={tmp}\test
DisableWelcomePage=False
DisableDirPage=False
DisableProgramGroupPage=False
DisableReadyPage=False
DisableReadyMemo=False
DisableFinishedPage=False
UserInfoPage=True
WizardResizable=False
WizardStyle=Classic
[Code]
Var
// Transparent Label Controls
TransparentBeveledLabel: TLabel;
TransparentComponentsDiskSpaceLabel: TLabel;
TransparentDiskSpaceLabel: TLabel;
TransparentFilenameLabel: TLabel;
TransparentFinishedHeadingLabel: TLabel;
TransparentFinishedLabel: TLabel;
TransparentInfoAfterClickLabel: TLabel;
TransparentInfoBeforeClickLabel: TLabel;
TransparentLicenseLabel1: TLabel;
TransparentPageDescriptionLabel: TLabel;
TransparentPageNameLabel: TLabel;
TransparentPasswordEditLabel: TLabel;
TransparentPasswordLabel: TLabel;
TransparentPreparingLabel: TLabel;
TransparentReadyLabel: TLabel;
TransparentSelectComponentsLabel: TLabel;
TransparentSelectDirBrowseLabel: TLabel;
TransparentSelectDirLabel: TLabel;
TransparentSelectStartMenuFolderBrowseLabel: TLabel;
TransparentSelectStartMenuFolderLabel: TLabel;
TransparentSelectTasksLabel: TLabel;
TransparentStatusLabel: TLabel;
TransparentUserInfoNameLabel: TLabel;
TransparentUserInfoOrgLabel: TLabel;
TransparentUserInfoSerialLabel: TLabel;
TransparentWelcomeLabel1: TLabel;
TransparentWelcomeLabel2: TLabel;
procedure InheritBoundsRect(ASource, ATarget: TControl);
begin
ATarget.Left := ASource.Left;
ATarget.Top := ASource.Top;
ATarget.Width := ASource.Width;
ATarget.Height := ASource.Height;
end;
procedure UpdateTransparentHeaderLabels();
begin
if TransparentBeveledLabel = nil then begin
TransparentBeveledLabel := TLabel.Create(WizardForm);
TransparentBeveledLabel.Parent := WizardForm.BeveledLabel.Parent;
TransparentBeveledLabel.Font := WizardForm.BeveledLabel.Font;
end;
TransparentBeveledLabel.WordWrap := WizardForm.BeveledLabel.WordWrap;
TransparentBeveledLabel.Anchors := WizardForm.BeveledLabel.Anchors;
InheritBoundsRect(WizardForm.BeveledLabel, TransparentBeveledLabel);
TransparentBeveledLabel.Caption := WizardForm.BeveledLabel.Caption;
TransparentBeveledLabel.Visible := True;
WizardForm.BeveledLabel.Visible := False;
if TransparentPageDescriptionLabel = nil then begin
TransparentPageDescriptionLabel := TLabel.Create(WizardForm);
TransparentPageDescriptionLabel.Parent := WizardForm.PageDescriptionLabel.Parent;
TransparentPageDescriptionLabel.Font := WizardForm.PageDescriptionLabel.Font;
end;
TransparentPageDescriptionLabel.WordWrap := WizardForm.PageDescriptionLabel.WordWrap;
TransparentPageDescriptionLabel.Anchors := WizardForm.PageDescriptionLabel.Anchors;
InheritBoundsRect(WizardForm.PageDescriptionLabel, TransparentPageDescriptionLabel);
TransparentPageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
TransparentPageDescriptionLabel.Visible := True;
WizardForm.PageDescriptionLabel.Visible := False;
if TransparentPageNameLabel = nil then begin
TransparentPageNameLabel := TLabel.Create(WizardForm);
TransparentPageNameLabel.Parent := WizardForm.PageNameLabel.Parent;
TransparentPageNameLabel.Font := WizardForm.PageNameLabel.Font;
end;
TransparentPageNameLabel.WordWrap := WizardForm.PageNameLabel.WordWrap;
TransparentPageNameLabel.Anchors := WizardForm.PageNameLabel.Anchors;
InheritBoundsRect(WizardForm.PageNameLabel, TransparentPageNameLabel);
TransparentPageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
TransparentPageNameLabel.Visible := True;
WizardForm.PageNameLabel.Visible := False;
end;
procedure UpdateTransparentPageLabels(CurPageID: Integer);
begin
if (CurPageID = wpWelcome) then begin
if TransparentWelcomeLabel1 = nil then begin
TransparentWelcomeLabel1 := TLabel.Create(WizardForm);
TransparentWelcomeLabel1.Parent := WizardForm.WelcomeLabel1.Parent;
TransparentWelcomeLabel1.Font := WizardForm.WelcomeLabel1.Font;
TransparentWelcomeLabel1.Visible := WizardForm.WelcomeLabel1.Visible;
end;
TransparentWelcomeLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
TransparentWelcomeLabel1.WordWrap := WizardForm.WelcomeLabel1.WordWrap;
TransparentWelcomeLabel1.Anchors := WizardForm.WelcomeLabel1.Anchors;
WizardForm.WelcomeLabel1.Visible := False;
InheritBoundsRect(WizardForm.WelcomeLabel1, TransparentWelcomeLabel1);
if TransparentWelcomeLabel2 = nil then begin
TransparentWelcomeLabel2 := TLabel.Create(WizardForm);
TransparentWelcomeLabel2.Parent := WizardForm.WelcomeLabel2.Parent;
TransparentWelcomeLabel2.Font := WizardForm.WelcomeLabel2.Font;
TransparentWelcomeLabel2.Visible := WizardForm.WelcomeLabel2.Visible;
end;
TransparentWelcomeLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
TransparentWelcomeLabel2.WordWrap := WizardForm.WelcomeLabel2.WordWrap;
TransparentWelcomeLabel2.Anchors := WizardForm.WelcomeLabel2.Anchors;
WizardForm.WelcomeLabel2.Visible := False;
InheritBoundsRect(WizardForm.WelcomeLabel2, TransparentWelcomeLabel2);
end;
if (CurPageID = wpLicense) then begin
if TransparentLicenseLabel1 = nil then begin
TransparentLicenseLabel1 := TLabel.Create(WizardForm);
TransparentLicenseLabel1.Parent := WizardForm.LicenseLabel1.Parent;
TransparentLicenseLabel1.Font := WizardForm.LicenseLabel1.Font;
TransparentLicenseLabel1.Visible := WizardForm.LicenseLabel1.Visible;
end;
TransparentLicenseLabel1.Caption := WizardForm.LicenseLabel1.Caption;
TransparentLicenseLabel1.WordWrap := WizardForm.LicenseLabel1.WordWrap;
TransparentLicenseLabel1.Anchors := WizardForm.LicenseLabel1.Anchors;
WizardForm.LicenseLabel1.Visible := False;
InheritBoundsRect(WizardForm.LicenseLabel1, TransparentLicenseLabel1);
end;
if (CurPageID = wpPassword) then begin
if TransparentPasswordEditLabel = nil then begin
TransparentPasswordEditLabel := TLabel.Create(WizardForm);
TransparentPasswordEditLabel.Parent := WizardForm.PasswordEditLabel.Parent;
TransparentPasswordEditLabel.Font := WizardForm.PasswordEditLabel.Font;
TransparentPasswordEditLabel.Visible := WizardForm.PasswordEditLabel.Visible;
end;
TransparentPasswordEditLabel.Caption := WizardForm.PasswordEditLabel.Caption;
TransparentPasswordEditLabel.WordWrap := WizardForm.PasswordEditLabel.WordWrap;
TransparentPasswordEditLabel.Anchors := WizardForm.PasswordEditLabel.Anchors;
WizardForm.PasswordEditLabel.Visible := False;
InheritBoundsRect(WizardForm.PasswordEditLabel, TransparentPasswordEditLabel);
if TransparentPasswordLabel = nil then begin
TransparentPasswordLabel := TLabel.Create(WizardForm);
TransparentPasswordLabel.Parent := WizardForm.PasswordLabel.Parent;
TransparentPasswordLabel.Font := WizardForm.PasswordLabel.Font;
TransparentPasswordLabel.Visible := WizardForm.PasswordLabel.Visible;
end;
TransparentPasswordLabel.Caption := WizardForm.PasswordLabel.Caption;
TransparentPasswordLabel.WordWrap := WizardForm.PasswordLabel.WordWrap;
TransparentPasswordLabel.Anchors := WizardForm.PasswordLabel.Anchors;
WizardForm.PasswordLabel.Visible := False;
InheritBoundsRect(WizardForm.PasswordLabel, TransparentPasswordLabel);
end;
if (CurPageID = wpInfoBefore) then begin
if TransparentInfoBeforeClickLabel = nil then begin
TransparentInfoBeforeClickLabel := TLabel.Create(WizardForm);
TransparentInfoBeforeClickLabel.Parent := WizardForm.InfoBeforeClickLabel.Parent;
TransparentInfoBeforeClickLabel.Font := WizardForm.InfoBeforeClickLabel.Font;
TransparentInfoBeforeClickLabel.Visible := WizardForm.InfoBeforeClickLabel.Visible;
end;
TransparentInfoBeforeClickLabel.Caption := WizardForm.InfoBeforeClickLabel.Caption;
TransparentInfoBeforeClickLabel.WordWrap := WizardForm.InfoBeforeClickLabel.WordWrap;
TransparentInfoBeforeClickLabel.Anchors := WizardForm.InfoBeforeClickLabel.Anchors;
WizardForm.InfoBeforeClickLabel.Visible := False;
InheritBoundsRect(WizardForm.InfoBeforeClickLabel, TransparentInfoBeforeClickLabel);
end;
if (CurPageID = wpUserInfo) then begin
if TransparentUserInfoNameLabel = nil then begin
TransparentUserInfoNameLabel := TLabel.Create(WizardForm);
TransparentUserInfoNameLabel.Parent := WizardForm.UserInfoNameLabel.Parent;
TransparentUserInfoNameLabel.Font := WizardForm.UserInfoNameLabel.Font;
TransparentUserInfoNameLabel.Visible := WizardForm.UserInfoNameLabel.Visible;
end;
TransparentUserInfoNameLabel.Caption := WizardForm.UserInfoNameLabel.Caption;
TransparentUserInfoNameLabel.WordWrap := WizardForm.UserInfoNameLabel.WordWrap;
TransparentUserInfoNameLabel.Anchors := WizardForm.UserInfoNameLabel.Anchors;
WizardForm.UserInfoNameLabel.Visible := False;
InheritBoundsRect(WizardForm.UserInfoNameLabel, TransparentUserInfoNameLabel);
if TransparentUserInfoOrgLabel = nil then begin
TransparentUserInfoOrgLabel := TLabel.Create(WizardForm);
TransparentUserInfoOrgLabel.Parent := WizardForm.UserInfoOrgLabel.Parent;
TransparentUserInfoOrgLabel.Font := WizardForm.UserInfoOrgLabel.Font;
TransparentUserInfoOrgLabel.Visible := WizardForm.UserInfoOrgLabel.Visible;
end;
TransparentUserInfoOrgLabel.Caption := WizardForm.UserInfoOrgLabel.Caption;
TransparentUserInfoOrgLabel.WordWrap := WizardForm.UserInfoOrgLabel.WordWrap;
TransparentUserInfoOrgLabel.Anchors := WizardForm.UserInfoOrgLabel.Anchors;
WizardForm.UserInfoOrgLabel.Visible := False;
InheritBoundsRect(WizardForm.UserInfoOrgLabel, TransparentUserInfoOrgLabel);
if TransparentUserInfoSerialLabel = nil then begin
TransparentUserInfoSerialLabel := TLabel.Create(WizardForm);
TransparentUserInfoSerialLabel.Parent := WizardForm.UserInfoSerialLabel.Parent;
TransparentUserInfoSerialLabel.Font := WizardForm.UserInfoSerialLabel.Font;
TransparentUserInfoSerialLabel.Visible := WizardForm.UserInfoSerialLabel.Visible;
end;
TransparentUserInfoSerialLabel.Caption := WizardForm.UserInfoSerialLabel.Caption;
TransparentUserInfoSerialLabel.WordWrap := WizardForm.UserInfoSerialLabel.WordWrap;
TransparentUserInfoSerialLabel.Anchors := WizardForm.UserInfoSerialLabel.Anchors;
WizardForm.UserInfoSerialLabel.Visible := False;
InheritBoundsRect(WizardForm.UserInfoSerialLabel, TransparentUserInfoSerialLabel);
end;
if (CurPageID = wpSelectDir) then begin
if TransparentDiskSpaceLabel = nil then begin
TransparentDiskSpaceLabel := TLabel.Create(WizardForm);
TransparentDiskSpaceLabel.Parent := WizardForm.DiskSpaceLabel.Parent;
TransparentDiskSpaceLabel.Font := WizardForm.DiskSpaceLabel.Font;
TransparentDiskSpaceLabel.Visible := WizardForm.DiskSpaceLabel.Visible;
end;
TransparentDiskSpaceLabel.Caption := WizardForm.DiskSpaceLabel.Caption;
TransparentDiskSpaceLabel.WordWrap := WizardForm.DiskSpaceLabel.WordWrap;
TransparentDiskSpaceLabel.Anchors := WizardForm.DiskSpaceLabel.Anchors;
WizardForm.DiskSpaceLabel.Visible := False;
InheritBoundsRect(WizardForm.DiskSpaceLabel, TransparentDiskSpaceLabel);
if TransparentFilenameLabel = nil then begin
TransparentFilenameLabel := TLabel.Create(WizardForm);
TransparentFilenameLabel.Parent := WizardForm.FilenameLabel.Parent;
TransparentFilenameLabel.Font := WizardForm.FilenameLabel.Font;
TransparentFilenameLabel.Visible := WizardForm.FilenameLabel.Visible;
end;
TransparentFilenameLabel.Caption := WizardForm.FilenameLabel.Caption;
TransparentFilenameLabel.WordWrap := WizardForm.FilenameLabel.WordWrap;
TransparentFilenameLabel.Anchors := WizardForm.FilenameLabel.Anchors;
WizardForm.FilenameLabel.Visible := False;
InheritBoundsRect(WizardForm.FilenameLabel, TransparentFilenameLabel);
if TransparentSelectDirBrowseLabel = nil then begin
TransparentSelectDirBrowseLabel := TLabel.Create(WizardForm);
TransparentSelectDirBrowseLabel.Parent := WizardForm.SelectDirBrowseLabel.Parent;
TransparentSelectDirBrowseLabel.Font := WizardForm.SelectDirBrowseLabel.Font;
TransparentSelectDirBrowseLabel.Visible := WizardForm.SelectDirBrowseLabel.Visible;
end;
TransparentSelectDirBrowseLabel.Caption := WizardForm.SelectDirBrowseLabel.Caption;
TransparentSelectDirBrowseLabel.WordWrap := WizardForm.SelectDirBrowseLabel.WordWrap;
TransparentSelectDirBrowseLabel.Anchors := WizardForm.SelectDirBrowseLabel.Anchors;
WizardForm.SelectDirBrowseLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectDirBrowseLabel, TransparentSelectDirBrowseLabel);
if TransparentSelectDirLabel = nil then begin
TransparentSelectDirLabel := TLabel.Create(WizardForm);
TransparentSelectDirLabel.Parent := WizardForm.SelectDirLabel.Parent;
TransparentSelectDirLabel.Font := WizardForm.SelectDirLabel.Font;
TransparentSelectDirLabel.Visible := WizardForm.SelectDirLabel.Visible;
end;
TransparentSelectDirLabel.Caption := WizardForm.SelectDirLabel.Caption;
TransparentSelectDirLabel.WordWrap := WizardForm.SelectDirLabel.WordWrap;
TransparentSelectDirLabel.Anchors := WizardForm.SelectDirLabel.Anchors;
WizardForm.SelectDirLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectDirLabel, TransparentSelectDirLabel);
end;
if (CurPageID = wpSelectComponents) then begin
if TransparentSelectComponentsLabel = nil then begin
TransparentSelectComponentsLabel := TLabel.Create(WizardForm);
TransparentSelectComponentsLabel.Parent := WizardForm.SelectComponentsLabel.Parent;
TransparentSelectComponentsLabel.Font := WizardForm.SelectComponentsLabel.Font;
TransparentSelectComponentsLabel.Visible := WizardForm.SelectComponentsLabel.Visible;
end;
TransparentSelectComponentsLabel.Caption := WizardForm.SelectComponentsLabel.Caption;
TransparentSelectComponentsLabel.WordWrap := WizardForm.SelectComponentsLabel.WordWrap;
TransparentSelectComponentsLabel.Anchors := WizardForm.SelectComponentsLabel.Anchors;
WizardForm.SelectComponentsLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectComponentsLabel, TransparentSelectComponentsLabel);
if TransparentComponentsDiskSpaceLabel = nil then begin
TransparentComponentsDiskSpaceLabel := TLabel.Create(WizardForm);
TransparentComponentsDiskSpaceLabel.Parent := WizardForm.ComponentsDiskSpaceLabel.Parent;
TransparentComponentsDiskSpaceLabel.Font := WizardForm.ComponentsDiskSpaceLabel.Font;
TransparentComponentsDiskSpaceLabel.Visible := WizardForm.ComponentsDiskSpaceLabel.Visible;
end;
TransparentComponentsDiskSpaceLabel.Caption := WizardForm.ComponentsDiskSpaceLabel.Caption;
TransparentComponentsDiskSpaceLabel.WordWrap := WizardForm.ComponentsDiskSpaceLabel.WordWrap;
TransparentComponentsDiskSpaceLabel.Anchors := WizardForm.ComponentsDiskSpaceLabel.Anchors;
WizardForm.ComponentsDiskSpaceLabel.Visible := False;
InheritBoundsRect(WizardForm.ComponentsDiskSpaceLabel, TransparentComponentsDiskSpaceLabel);
end;
if (CurPageID = wpSelectProgramGroup) then begin
if TransparentSelectStartMenuFolderBrowseLabel = nil then begin
TransparentSelectStartMenuFolderBrowseLabel := TLabel.Create(WizardForm);
TransparentSelectStartMenuFolderBrowseLabel.Parent := WizardForm.SelectStartMenuFolderBrowseLabel.Parent;
TransparentSelectStartMenuFolderBrowseLabel.Font := WizardForm.SelectStartMenuFolderBrowseLabel.Font;
TransparentSelectStartMenuFolderBrowseLabel.Visible := WizardForm.SelectStartMenuFolderBrowseLabel.Visible;
end;
TransparentSelectStartMenuFolderBrowseLabel.Caption := WizardForm.SelectStartMenuFolderBrowseLabel.Caption;
TransparentSelectStartMenuFolderBrowseLabel.WordWrap := WizardForm.SelectStartMenuFolderBrowseLabel.WordWrap;
TransparentSelectStartMenuFolderBrowseLabel.Anchors := WizardForm.SelectStartMenuFolderBrowseLabel.Anchors;
WizardForm.SelectStartMenuFolderBrowseLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectStartMenuFolderBrowseLabel, TransparentSelectStartMenuFolderBrowseLabel);
if TransparentSelectStartMenuFolderLabel = nil then begin
TransparentSelectStartMenuFolderLabel := TLabel.Create(WizardForm);
TransparentSelectStartMenuFolderLabel.Parent := WizardForm.SelectStartMenuFolderLabel.Parent;
TransparentSelectStartMenuFolderLabel.Font := WizardForm.SelectStartMenuFolderLabel.Font;
TransparentSelectStartMenuFolderLabel.Visible := WizardForm.SelectStartMenuFolderLabel.Visible;
end;
TransparentSelectStartMenuFolderLabel.Caption := WizardForm.SelectStartMenuFolderLabel.Caption;
TransparentSelectStartMenuFolderLabel.WordWrap := WizardForm.SelectStartMenuFolderLabel.WordWrap;
TransparentSelectStartMenuFolderLabel.Anchors := WizardForm.SelectStartMenuFolderLabel.Anchors;
WizardForm.SelectStartMenuFolderLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectStartMenuFolderLabel, TransparentSelectStartMenuFolderLabel);
end;
if (CurPageID = wpSelectTasks) then begin
if TransparentSelectTasksLabel = nil then begin
TransparentSelectTasksLabel := TLabel.Create(WizardForm);
TransparentSelectTasksLabel.Parent := WizardForm.SelectTasksLabel.Parent;
TransparentSelectTasksLabel.Font := WizardForm.SelectTasksLabel.Font;
TransparentSelectTasksLabel.Visible := WizardForm.SelectTasksLabel.Visible;
end;
TransparentSelectTasksLabel.Caption := WizardForm.SelectTasksLabel.Caption;
TransparentSelectTasksLabel.WordWrap := WizardForm.SelectTasksLabel.WordWrap;
TransparentSelectTasksLabel.Anchors := WizardForm.SelectTasksLabel.Anchors;
WizardForm.SelectTasksLabel.Visible := False;
InheritBoundsRect(WizardForm.SelectTasksLabel, TransparentSelectTasksLabel);
end;
if (CurPageID = wpReady) then begin
if TransparentReadyLabel = nil then begin
TransparentReadyLabel := TLabel.Create(WizardForm);
TransparentReadyLabel.Parent := WizardForm.ReadyLabel.Parent;
TransparentReadyLabel.Font := WizardForm.ReadyLabel.Font;
TransparentReadyLabel.Visible := WizardForm.ReadyLabel.Visible;
end;
TransparentReadyLabel.Caption := WizardForm.ReadyLabel.Caption;
TransparentReadyLabel.WordWrap := WizardForm.ReadyLabel.WordWrap;
TransparentReadyLabel.Anchors := WizardForm.ReadyLabel.Anchors;
WizardForm.ReadyLabel.Visible := False;
InheritBoundsRect(WizardForm.ReadyLabel, TransparentReadyLabel);
end;
if (CurPageID = wpPreparing) then begin
if TransparentPreparingLabel = nil then begin
TransparentPreparingLabel := TLabel.Create(WizardForm);
TransparentPreparingLabel.Parent := WizardForm.PreparingLabel.Parent;
TransparentPreparingLabel.Font := WizardForm.PreparingLabel.Font;
TransparentPreparingLabel.Visible := WizardForm.PreparingLabel.Visible;
end;
TransparentPreparingLabel.Caption := WizardForm.PreparingLabel.Caption;
TransparentPreparingLabel.WordWrap := WizardForm.PreparingLabel.WordWrap;
TransparentPreparingLabel.Anchors := WizardForm.PreparingLabel.Anchors;
WizardForm.PreparingLabel.Visible := False;
InheritBoundsRect(WizardForm.PreparingLabel, TransparentPreparingLabel);
end;
if (CurPageID = wpInstalling) then begin
if TransparentStatusLabel = nil then begin
TransparentStatusLabel := TLabel.Create(WizardForm);
TransparentStatusLabel.Parent := WizardForm.StatusLabel.Parent;
TransparentStatusLabel.Font := WizardForm.StatusLabel.Font;
TransparentStatusLabel.Visible := WizardForm.StatusLabel.Visible;
end;
TransparentStatusLabel.Caption := WizardForm.StatusLabel.Caption;
TransparentStatusLabel.WordWrap := WizardForm.StatusLabel.WordWrap;
TransparentStatusLabel.Anchors := WizardForm.StatusLabel.Anchors;
WizardForm.StatusLabel.Visible := False;
InheritBoundsRect(WizardForm.StatusLabel, TransparentStatusLabel);
end;
if (CurPageID = wpInfoAfter) then begin
if TransparentInfoAfterClickLabel = nil then begin
TransparentInfoAfterClickLabel := TLabel.Create(WizardForm);
TransparentInfoAfterClickLabel.Parent := WizardForm.InfoAfterClickLabel.Parent;
TransparentInfoAfterClickLabel.Font := WizardForm.InfoAfterClickLabel.Font;
TransparentInfoAfterClickLabel.Visible := WizardForm.InfoAfterClickLabel.Visible;
end;
TransparentInfoAfterClickLabel.Caption := WizardForm.InfoAfterClickLabel.Caption;
TransparentInfoAfterClickLabel.WordWrap := WizardForm.InfoAfterClickLabel.WordWrap;
TransparentInfoAfterClickLabel.Anchors := WizardForm.InfoAfterClickLabel.Anchors;
WizardForm.InfoAfterClickLabel.Visible := False;
InheritBoundsRect(WizardForm.InfoAfterClickLabel, TransparentInfoAfterClickLabel);
end;
if (CurPageID = wpFinished) then begin
if TransparentFinishedHeadingLabel = nil then begin
TransparentFinishedHeadingLabel := TLabel.Create(WizardForm);
TransparentFinishedHeadingLabel.Parent := WizardForm.FinishedHeadingLabel.Parent;
TransparentFinishedHeadingLabel.Font := WizardForm.FinishedHeadingLabel.Font;
TransparentFinishedHeadingLabel.Visible := WizardForm.FinishedHeadingLabel.Visible;
end;
TransparentFinishedHeadingLabel.Caption := WizardForm.FinishedHeadingLabel.Caption;
TransparentFinishedHeadingLabel.WordWrap := WizardForm.FinishedHeadingLabel.WordWrap;
TransparentFinishedHeadingLabel.Anchors := WizardForm.FinishedHeadingLabel.Anchors;
WizardForm.FinishedHeadingLabel.Visible := False;
InheritBoundsRect(WizardForm.FinishedHeadingLabel, TransparentFinishedHeadingLabel);
if TransparentFinishedLabel = nil then begin
TransparentFinishedLabel := TLabel.Create(WizardForm);
TransparentFinishedLabel.Parent := WizardForm.FinishedLabel.Parent;
TransparentFinishedLabel.Font := WizardForm.FinishedLabel.Font;
TransparentFinishedLabel.Visible := WizardForm.FinishedLabel.Visible;
end;
TransparentFinishedLabel.Caption := WizardForm.FinishedLabel.Caption;
TransparentFinishedLabel.WordWrap := WizardForm.FinishedLabel.WordWrap;
TransparentFinishedLabel.Anchors := WizardForm.FinishedLabel.Anchors;
WizardForm.FinishedLabel.Visible := False;
InheritBoundsRect(WizardForm.FinishedLabel, TransparentFinishedLabel);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
UpdateTransparentHeaderLabels();
UpdateTransparentPageLabels(CurPageID);
end;