修改Inno Wizard Pages的尺寸,背景图片等

时间:2014-03-17 16:38:00

标签: inno-setup

我有这部分代码可以调整我的欢迎页面,但完成的页面仍然是默认的Inno页面,旁边有丑陋的向导图片。我想对完成的页面做同样的事情,就像我做的欢迎一样

[Code]
    procedure InheritBoundsRect(ASource, ATarget: TControl);
    begin
      ATarget.Left := 210;
      ATarget.Top := ASource.Top;
      ATarget.Width := 295;
      ATarget.Height := ASource.Height;
    end;

    procedure InitializeWizard;
    var
      TopWelcomeLabel: TLabel;
      BottomWelcomeLabel: TLabel;
    begin

      WizardForm.WizardBitmapImage.Align := alClient;
      WizardForm.WizardBitmapImage.Bitmap.LoadFromFile('Q:\Inno\wizardimages\new\bmp.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;

用解决方案编辑:

现在在这个家伙的帮助下,这是一个似乎很有用的新代码

[Code]
    procedure InheritBoundsRect(ASource, ATarget: TControl);
    begin
      ATarget.Left := 210;
      ATarget.Top := ASource.Top;
      ATarget.Width := 295;
      ATarget.Height := ASource.Height;
    end;

    procedure InitializeWizard;
    var
      TopWelcomeLabel: TLabel;
      BottomWelcomeLabel: TLabel;
    begin

      WizardForm.WizardBitmapImage.Align := alClient;
      WizardForm.WizardBitmapImage.Bitmap.LoadFromFile('bmp.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;

      WizardForm.WizardBitmapImage2.Align := alClient;


//Stackoverflow changes start here...

      WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile('bmp.bmp');

      WizardForm.FinishedLabel.Left := 210;
      WizardForm.FinishedLabel.Width := 265;

      WizardForm.FinishedHeadingLabel.Left := 210;
      WizardForm.FinishedHeadingLabel.Width := 265

      WizardForm.RunList.Left := 210;
    end;

1 个答案:

答案 0 :(得分:2)

最后一页的组件名称是:

  • FinishedLabel
  • FinishedHeadingLabel
  • WizardBitmapImage2

我在这张照片中标记了他们:

enter image description here