gpt4 book ai didi

inno-setup - 将 Inno Setup MainPanel 调整为横幅图像大小

转载 作者:行者123 更新时间:2023-12-04 04:02:15 24 4
gpt4 key购买 nike

图像 不允许我调整用于 MainPanel 的图像的大小。这导致了问题,因为它覆盖了我创建的输入查询页面。如何确保输入查询页面“增长”到 MainPanel 图像设置的尺寸?

enter image description here

procedure InitializeWizard;
begin
{ Extract the banner so we can use it with the input page. }
BannerImage := TBitmapImage.Create(WizardForm);
BannerImage.Bitmap.LoadFromFile('C:\temp\tempbanner.bmp');
{ Create the Bitmap Banner img to show on the Main Panel. }
BannerImage.Parent := WizardForm.MainPanel;
WizardForm.MainPanel.Width := SPLASH_SCREEN_WIDTH;
WizardForm.MainPanel.Height := BANNER_HEIGHT;
BannerImage.Width := WizardForm.MainPanel.Width;
BannerImage.Height := WizardForm.MainPanel.Height;
{ BannerImage.Anchors := [akLeft, akTop, akRight, akBottom]; }
BannerImage.Stretch := False;
BannerImage.AutoSize := False;

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

{ Create the input page }
ReportingServerPage := CreateInputQueryPage(wpWelcome,
'Title', 'What is your XXX?',
'Please enter your Server URL, then click Next.'+#13#10+#13#10+'If you proceed without entering a URL, you can update it in the %AppData%\xxxxxxxx\xxxx\xxxxx\xxxx_launcher.properties file at a later stage.');
ReportingServerPageId := ReportingServerPage.ID;
{ Add items (False means it's not a password edit) }
ReportingServerPage.Add('&Reporting Server URL:', False);

end;

最佳答案

您必须增加窗口高度并将窗口内容(Bevel1InnerNotebook)向下移动。

请注意,底部对齐的控件(底部按钮)会随着窗口高度的增加而自动移动(假设您使用最新版本的 Inno Setup)。

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

[Code]

var
ReportingServerPage: TInputQueryWizardPage;

procedure InitializeWizard;
var
BannerImage: TBitmapImage;
Delta: Integer;
begin
BannerImage := TBitmapImage.Create(WizardForm);
ExtractTemporaryFile('banner.bmp');
BannerImage.AutoSize := True;
BannerImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\banner.bmp'));
BannerImage.Parent := WizardForm.InnerPage;
BannerImage.Left := 0;
BannerImage.Top := 0;

Delta := BannerImage.Height - WizardForm.Bevel1.Top;
WizardForm.Height := WizardForm.Height + Delta;
WizardForm.Bevel1.Top := WizardForm.Bevel1.Top + Delta;
WizardForm.InnerNotebook.Top := WizardForm.InnerNotebook.Top + Delta;
WizardForm.InnerNotebook.Height := WizardForm.InnerNotebook.Height - Delta;

WizardForm.MainPanel.Visible := False;

{ Create the input page }
ReportingServerPage := CreateInputQueryPage(wpWelcome,
'Title', 'What is your XXX?',
'Please enter your Server URL, then click Next.'+#13#10+#13#10+
'If you proceed without entering a URL, you can update it in the ' +
'%AppData%\xxxxxxxx\xxxx\xxxxx\xxxx_launcher.properties file at a later stage.');
{ Add items (False means it's not a password edit) }
ReportingServerPage.Add('&Reporting Server URL:', False);
end;

请注意,代码不适合图像/窗口宽度。它假定图像宽度适合窗口宽度。


enter image description here

关于inno-setup - 将 Inno Setup MainPanel 调整为横幅图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62907577/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com