In Inno Setup, can I add a note (static text) to t

2019-06-09 13:20发布

In Inno Setup, can I add a note (static text) to the Select Tasks page? For added bonus, I would like the note to be blue.

标签: inno-setup
1条回答
神经病院院长
2楼-- · 2019-06-09 13:35

Every page of the wizard form can be modified, including tasks page. Problem might be the space left on that page. In the following example I cut the TasksList bottom (as you didn't say where do you want to put your note) and into the gain space inserted a static text:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Tasks]
Name: task1; Description: "1. Task"; Flags: unchecked
Name: task2; Description: "2. Task"; Flags: unchecked

[Code]
const
  NoteHeight = 50;

procedure InitializeWizard;
var
  Note: TNewStaticText;
begin
  WizardForm.TasksList.Height := WizardForm.TasksList.Height - NoteHeight;

  Note := TNewStaticText.Create(WizardForm);
  Note.Parent := WizardForm.SelectTasksPage;
  Note.AutoSize := False;
  Note.SetBounds(
    WizardForm.TasksList.Left,
    WizardForm.TasksList.Top + WizardForm.TasksList.Height,
    WizardForm.TasksList.Width,
    NoteHeight
  );
  Note.Font.Color := clBlue;
  Note.Caption := 'Lorem ipsum dolor sit amet, consectetur adipisicing' + #13#10 +
    'elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
end;

This is how it looks like:

enter image description here

查看更多
登录 后发表回答