在Inno Setup中,我可以在“选择任务"页面上添加注释(静态文本)吗? [英] In Inno Setup, can I add a note (static text) to the Select Tasks page?

查看:106
本文介绍了在Inno Setup中,我可以在“选择任务"页面上添加注释(静态文本)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Inno Setup中,我可以在选择任务"页面上添加注释(静态文本)吗?为了获得额外的奖励,我希望该笔记为蓝色.

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.

推荐答案

可以修改向导表单的每个页面,包括任务页面.问题可能是该页面上剩余的空间.在下面的示例中,我将TasksList底部切开(因为您没有说您想将便笺放在何处),并在增益空间中插入了静态文本:

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;

它是这样的:

这篇关于在Inno Setup中,我可以在“选择任务"页面上添加注释(静态文本)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆