Inno Setup: Resize uninstall progress form with all its components

前端 未结 1 1786
我在风中等你
我在风中等你 2021-01-07 01:12

Hey I need to increase width and height of UninstallProgressForm of my Inno Setup uninstaller.

When I changed its width and height manually according to

相关标签:
1条回答
  • 2021-01-07 02:10

    You have to increase sizes or shift positions of all window components, one by one. For list of components, see a definition of the TUninstallProgressForm class:

    TUninstallProgressForm = class(TSetupForm)
      property OuterNotebook: TNewNotebook; read;
      property InnerPage: TNewNotebookPage; read;
      property InnerNotebook: TNewNotebook; read;
      property InstallingPage: TNewNotebookPage; read;
      property MainPanel: TPanel; read;
      property PageNameLabel: TNewStaticText; read;
      property PageDescriptionLabel: TNewStaticText; read;
      property WizardSmallBitmapImage: TBitmapImage; read;
      property Bevel1: TBevel; read;
      property StatusLabel: TNewStaticText; read;
      property ProgressBar: TNewProgressBar; read;
      property BeveledLabel: TNewStaticText; read;
      property Bevel: TBevel; read;
      property CancelButton: TNewButton; read;
    end;
    

    The code can be like:

    const
      DeltaX = 150;
      DeltaY = 50;
    
    procedure IncWidth(Control: TControl);
    begin
      Control.Width := Control.Width + DeltaX;
    end;
    
    procedure IncHeight(Control: TControl);
    begin
      Control.Height := Control.Height + DeltaY;
    end;
    
    procedure IncLeft(Control: TControl);
    begin
      Control.Left := Control.Left + DeltaX;
    end;
    
    procedure IncTop(Control: TControl);
    begin
      Control.Top := Control.Top + DeltaY;
    end;
    
    procedure IncWidthAndHeight(Control: TControl);
    begin
      IncWidth(Control);
      IncHeight(Control);
    end;
    
    procedure InitializeUninstallProgressForm();
    begin
      IncWidthAndHeight(UninstallProgressForm);
      IncWidth(UninstallProgressForm.Bevel);
      IncLeft(UninstallProgressForm.CancelButton);
      IncTop(UninstallProgressForm.CancelButton);
      IncWidthAndHeight(UninstallProgressForm.OuterNotebook);
      IncWidthAndHeight(UninstallProgressForm.InnerPage);
      IncWidth(UninstallProgressForm.Bevel1);
      IncWidthAndHeight(UninstallProgressForm.InnerNotebook);
      IncWidth(UninstallProgressForm.ProgressBar);
      IncWidth(UninstallProgressForm.StatusLabel);
      IncWidth(UninstallProgressForm.MainPanel);
      IncLeft(UninstallProgressForm.WizardSmallBitmapImage);
      IncWidth(UninstallProgressForm.PageDescriptionLabel);
      IncWidth(UninstallProgressForm.PageNameLabel);
      IncTop(UninstallProgressForm.BeveledLabel);
    end;
    


    See also How to change wizard size (width and height) in an Inno Setup installer?

    0 讨论(0)
提交回复
热议问题