gpt4 book ai didi

inno-setup - 如何在Inno Setup安装程序中更改向导大小(宽度和高度)?

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

Inno Setup的安装向导大小是固定的,但我想更改向导安装大小并更改一些项目,包括图像和...

最佳答案

创新设置6

Inno Setup 6支持更改向导窗口的大小。

您可以使用 WizardSizePercent 更改向导窗口的大小。

您还可以使用 WizardResizable 来允许用户调整向导的大小(如果使用modern WizardStyle ,则这是默认行为)。

创新设置5

没有任何神奇的方法可以使向导页面变大。它们是为特定尺寸设计的。如果要使它们变大,则必须逐页逐个控制,并仔细决定如何为新尺寸布置它们。

以下代码仅是示例,您可能希望选择布局的另一种更改。

procedure ShiftDown(Control: TControl; DeltaY: Integer);
begin
Control.Top := Control.Top + DeltaY;
end;

procedure ShiftRight(Control: TControl; DeltaX: Integer);
begin
Control.Left := Control.Left + DeltaX;
end;

procedure ShiftDownAndRight(Control: TControl; DeltaX, DeltaY: Integer);
begin
ShiftDown(Control, DeltaY);
ShiftRight(Control, DeltaX);
end;

procedure GrowDown(Control: TControl; DeltaY: Integer);
begin
Control.Height := Control.Height + DeltaY;
end;

procedure GrowRight(Control: TControl; DeltaX: Integer);
begin
Control.Width := Control.Width + DeltaX;
end;

procedure GrowRightAndDown(Control: TControl; DeltaX, DeltaY: Integer);
begin
GrowRight(Control, DeltaX);
GrowDown(Control, DeltaY);
end;

procedure GrowRightAndShiftDown(Control: TControl; DeltaX, DeltaY: Integer);
begin
GrowRight(Control, DeltaX);
ShiftDown(Control, DeltaY);
end;

procedure GrowWizard(DeltaX, DeltaY: Integer);
begin
GrowRightAndDown(WizardForm, DeltaX, DeltaY);

with WizardForm do
begin
GrowRightAndShiftDown(Bevel, DeltaX, DeltaY);
ShiftDownAndRight(CancelButton, DeltaX, DeltaY);
ShiftDownAndRight(NextButton, DeltaX, DeltaY);
ShiftDownAndRight(BackButton, DeltaX, DeltaY);
GrowRightAndDown(OuterNotebook, DeltaX, DeltaY);
GrowRight(BeveledLabel, DeltaX);

{ WelcomePage }
GrowDown(WizardBitmapImage, DeltaY);
GrowRight(WelcomeLabel2, DeltaX);
GrowRight(WelcomeLabel1, DeltaX);

{ InnerPage }
GrowRight(Bevel1, DeltaX);
GrowRightAndDown(InnerNotebook, DeltaX, DeltaY);

{ LicensePage }
ShiftDown(LicenseNotAcceptedRadio, DeltaY);
ShiftDown(LicenseAcceptedRadio, DeltaY);
GrowRightAndDown(LicenseMemo, DeltaX, DeltaY);
GrowRight(LicenseLabel1, DeltaX);

{ SelectDirPage }
GrowRightAndShiftDown(DiskSpaceLabel, DeltaX, DeltaY);
ShiftRight(DirBrowseButton, DeltaX);
GrowRight(DirEdit, DeltaX);
GrowRight(SelectDirBrowseLabel, DeltaX);
GrowRight(SelectDirLabel, DeltaX);

{ SelectComponentsPage }
GrowRightAndShiftDown(ComponentsDiskSpaceLabel, DeltaX, DeltaY);
GrowRightAndDown(ComponentsList, DeltaX, DeltaY);
GrowRight(TypesCombo, DeltaX);
GrowRight(SelectComponentsLabel, DeltaX);

{ SelectTasksPage }
GrowRightAndDown(TasksList, DeltaX, DeltaY);
GrowRight(SelectTasksLabel, DeltaX);

{ ReadyPage }
GrowRightAndDown(ReadyMemo, DeltaX, DeltaY);
GrowRight(ReadyLabel, DeltaX);

{ InstallingPage }
GrowRight(FilenameLabel, DeltaX);
GrowRight(StatusLabel, DeltaX);
GrowRight(ProgressGauge, DeltaX);

{ MainPanel }
GrowRight(MainPanel, DeltaX);
ShiftRight(WizardSmallBitmapImage, DeltaX);
GrowRight(PageDescriptionLabel, DeltaX);
GrowRight(PageNameLabel, DeltaX);

{ FinishedPage }
GrowDown(WizardBitmapImage2, DeltaY);
GrowRight(RunList, DeltaX);
GrowRight(FinishedLabel, DeltaX);
GrowRight(FinishedHeadingLabel, DeltaX);
end;
end;

使用 GrowWizard事件函数(或其他函数)中的 InitializeWizard函数,以宽度和高度的变化作为参数:

procedure InitializeWizard();
begin
GrowWizard(ScaleX(100), ScaleY(80));
end;

该代码将处理以下页面:
  • 欢迎页面

    WelcomePage
  • 许可页面

    LicensePage
  • SelectDirPage

    SelectDirPage
  • SelectComponentsPage

    SelectComponentsPage
  • SelectTasksPage

    SelectTasksPage
  • ReadyPage

    ReadyPage
  • 安装页面

    InstallingPage
  • FinishedPage

    FinishedPage


  • 其他不那么常见的页面留给读者练习:
  • 密码页面
  • InfoBeforePage(与LicensePage相同)
  • UserInfoPage
  • SelectProgramGroupPage
  • PreparingPage
  • InfoAfterPage(与LicensePage相同)


  • 类似问题:
  • How to display a larger license box in an InnoSetup installer?
  • Larger "Select Components" page in Inno Setup
  • How to change wizard size (width and height) in an Inno Setup installer?
  • Inno Setup: Resize uninstall progress form with all its components
  • How to reduce the line spacing between two input boxes on Inno Setup TInputQueryWizardPage (CreateInputQueryPage)
  • 关于inno-setup - 如何在Inno Setup安装程序中更改向导大小(宽度和高度)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11778292/

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