Long descriptions on Inno Setup components

前端 未结 2 1530
花落未央
花落未央 2020-11-27 20:59

I am building an install with Inno Setup and I am using the components section to allow the end user to select optional items to install.

Some of these items need a

2条回答
  •  萌比男神i
    2020-11-27 21:19

    Use this advanced compiler (download link is somewhere below).

    It supports more classes and events than the standard compiler. You can access the property "OnItemMouseMove". Using this you can store a description for every item that is shown by a label. Here is an example:

    var
    CompLabel: TLabel;
    
    procedure OnItemMouseMove(Sender: TObject; X, Y: Integer; Index: Integer; Area: TItemArea);
    begin
      case Index of
        0: CompLabel.Caption := 'This is the description of Component 1';
        1: CompLabel.Caption := 'This is the description of Component 2';
        2: CompLabel.Caption := 'This is the description of Component 3';
        3: CompLabel.Caption := 'This is the description of Component 4'
      else
        CompLabel.Caption := 'Move your mouse over a component to see its description.';
      end;
    end;
    
    procedure OnMouseLeave(Sender: TObject);
    begin
      CompLabel.Caption := 'Move your mouse over a component to see its description.';
    end;
    
    procedure InitializeWizard();
    begin
      CompLabel := TLabel.Create(WizardForm);
      CompLabel.Parent := WizardForm.SelectComponentsPage;
      CompLabel.SetBounds(WizardForm.ComponentsList.Left,180,WizardForm.ComponentsList.Width,200);
      CompLabel.Caption := 'Move your mouse over a component to see its description.';
      WizardForm.ComponentsList.OnItemMouseMove := @OnItemMouseMove;
      WizardForm.ComponentsList.OnMouseLeave := @OnMouseLeave;
      WizardForm.ComponentsList.Height := WizardForm.ComponentsList.Height - 40;
    end;
    

提交回复
热议问题