http://379910987.blog.163.com/blog/static/3352379720126693742406/

今天说说TNewCheckListBox类。
该类和ListBox差不多,只是下面的项可以用CheckBox或者RadioButton选择,是一种比较复杂的类型。

该类继承自TCustomListBox,自身具有以下属性和函数: 
TNewCheckListBox = class(TCustomListBox)
  function AddCheckBox(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled, AHasInternalChildren, ACheckWhenParentChecked: Boolean; AObject: TObject): Integer;
  function AddGroup(ACaption, ASubItem: String; ALevel: Byte; AObject: TObject): Integer;
  function AddRadioButton(const ACaption, ASubItem: String; ALevel: Byte; AChecked, AEnabled: Boolean; AObject: TObject): Integer;
  function CheckItem(const Index: Integer; const AOperation: TCheckItemOperation): Boolean;
  property Checked[Index: Integer]: Boolean; read write;
  property State[Index: Integer]: TCheckBoxState; read write;
  property ItemCaption[Index: Integer]: String; read write;
  property ItemEnabled[Index: Integer]: Boolean; read write;
  property ItemLevel[Index: Integer]: Byte; read;
  property ItemObject[Index: Integer]: TObject; read write;
  property ItemSubItem[Index: Integer]: String; read write;
  property AllowGrayed: Boolean; read write;
  property Flat: Boolean; read write;
  property MinItemHeight: Integer; read write;
  property Offset: Integer; read write;
  property OnClickCheck: TNotifyEvent; read write;
  property BorderStyle: TBorderStyle; read write;
  property Color: TColor; read write;
  property Font: TFont; read write;
  property Sorted: Boolean; read write;
  property OnClick: TNotifyEvent; read write;
  property OnDblClick: TNotifyEvent; read write;
  property OnKeyDown: TKeyEvent; read write;
  property OnKeyPress: TKeyPressEvent; read write;
  property OnKeyUp: TKeyEvent; read write;
  property ShowLines: Boolean; read write;
  property WantTabs: Boolean; read write;
  property RequireRadioSelection: Boolean; read write;
end

测试例子:

[code]
var
myPage:TWizardPage;
    clb1, clb2: TNewCheckListBox;
    lbl: TLabel;
    i,index:Integer;

procedure clbClickCheck(Sender: TObject);
begin
  lbl.Caption:='';
  for i:=1 to 3 do
    if clb1.Checked[i] then
        lbl.Caption:=clb1.ItemCaption[i]+'  '; 
        
    for i:=5 to 7 do
        if clb1.Checked[i] then
            lbl.Caption:=lbl.Caption+clb1.ItemCaption[i]+' ';
 
end;
 
procedure InitializeWizard();
begin
    myPage:=CreateCustomPage(wpWelcome, '标题:自定义页面', '描述:这是我的自定义页面');
    
    lbl:=TLabel.Create(myPage);
    lbl.Parent:=myPage.Surface;
    
    clb1 := TNewCheckListBox.Create(mypage);
clb1.Width := mypage.SurfaceWidth;
clb1.Top:=20;
clb1.Height := ScaleY(200);
clb1.Flat := True;
clb1.Parent := mypage.Surface;
clb1.AddCheckBox('操作系统', '', 0, True, True, False, True, nil);
clb1.AddRadioButton('Windows 2000', '', 1, False, True, nil);
clb1.AddRadioButton('Windows XP', '', 1, True, True, nil);
clb1.AddRadioButton('Windows 7', '', 1, False, True, nil);
clb1.AddCheckBox('可安装组件', '', 0, True, True, False, True, nil);
 
clb1.AddCheckBox('组件1', '', 1, True, True, False, True, nil);
    clb1.AddCheckBox('组件2', '', 1, True, True, False, True, nil);
    clb1.AddCheckBox('组件3', '', 1, False, True, False, True, nil);
    clb1.OnClickCheck:=@clbClickCheck;   
end;
运行效果如下:

其中的 procedure clbClickCheck将动态地根据所选项进行自动调整。

Inno Setup入门(二十五)——Inno Setup类参考(11)的更多相关文章

  1. Inno Setup入门(十五)——Inno Setup类参考(1)

    分类: Install Setup 2013-02-02 11:27 536人阅读 评论(0) 收藏 举报 nno setup脚本能够支持许多的类,这些类使得安装程序的功能得到很大的加强,通过对这些类 ...

  2. (转)Inno Setup入门(十五)——Inno Setup类参考(1)

    本文转载自:http://blog.csdn.net/yushanddddfenghailin/article/details/17250955 nno setup脚本能够支持许多的类,这些类使得安装 ...

  3. Inno Setup入门(十五)——Inno Setup类参考(1)

    Inno setup脚本能够支持许多的类,这些类使得安装程序的功能得到很大的加强,通过对这些类的使用,将会创建出许多让人惊奇的安装程序,下面开始类的学习. 创建自定义向导页 自定义向导页需要在Init ...

  4. [WebGL入门]二十五,点光源的光照

    注:文章译自http://wgld.org/,原作者杉本雅広(doxas),文章中假设有我的额外说明.我会加上[lufy:].另外,鄙人webgl研究还不够深入,一些专业词语.假设翻译有误,欢迎大家指 ...

  5. Inno Setup入门(十六)——Inno Setup类参考(2)

    Inno Setup入门(十六)——Inno Setup类参考(2) http://379910987.blog.163.com/blog/static/33523797201112755641236 ...

  6. Bootstrap入门(二十五)JS插件2:过渡效果

    Bootstrap入门(二十五)JS插件2:过渡效果 对于简单的过渡效果,只需将 transition.js 和其它 JS 文件一起引入即可.如果你使用的是编译(或压缩)版的bootstrap.js  ...

  7. FreeSql (二十五)延时加载

    FreeSql 支持导航属性延时加载,即当我们需要用到的时候才进行加载(读取),支持1对1.多对1.1对多.多对多关系的导航属性. 当我们希望浏览某条订单信息的时候,才显示其对应的订单详细记录时,我们 ...

  8. Bootstrap <基础二十五>警告(Alerts)

    警告(Alerts)以及 Bootstrap 所提供的用于警告的 class.警告(Alerts)向用户提供了一种定义消息样式的方式.它们为典型的用户操作提供了上下文信息反馈. 您可以为警告框添加一个 ...

  9. 无废话ExtJs 入门教程十五[员工信息表Demo:AddUser]

    无废话ExtJs 入门教程十五[员工信息表Demo:AddUser] extjs技术交流,欢迎加群(201926085) 前面我们共介绍过10种表单组件,这些组件是我们在开发过程中最经常用到的,所以一 ...

  10. VMware vSphere 服务器虚拟化之二十五 桌面虚拟化之终端服务池

    VMware vSphere 服务器虚拟化之二十五 桌面虚拟化之终端服务池 终端服务池是指由一台或多台微软终端服务器提供服务的桌面源组成的池.终端服务器桌面源可交付多个桌面.它具有以下特征: 1.终端 ...

随机推荐

  1. jmeter===JMeter 中Random 随机函数的使用(转)

    原文:http://blog.csdn.net/dreamtl/article/details/68952272 场景:在做接口测试时,比如说要求用户的手机号码不允许重复,那此时可以通过Random ...

  2. nginx源码分析--使用GDB调试(strace、 pstack )

    nginx源码分析--使用GDB调试(strace.  pstack ) http://blog.csdn.net/scdxmoe/article/details/49070577

  3. socket.io入门整理

    我自己在用socket.io开发,对官方网站上的文档,进行简单的整理,然后自己写了一个简单的聊天程序. 最最开始 先安装socket.io: 1 npm install socket.io 利用Nod ...

  4. 2017多校第7场 HDU 6129 Just do it 找规律

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6129 题意:求a序列后m次xor前缀和 解法: 手动对1位置对每个位置的贡献打表发现 第一次 贡献为 ...

  5. KettleDB连接jdbc连接池参数介绍

    http://sheng8407-sina-com.iteye.com/blog/1163245 http://blog.csdn.net/dingxingmei/article/details/41 ...

  6. Every Tom,Dick and Harry. 不管张三李四。

    1 every  adj   每个,最大的,所有的,一切的 Every other girl except me is wearing jeans.  除了我之外的每个女孩都穿着牛仔裤. I have ...

  7. Hibernate检索策略与检索方式

    hibernate的Session在加载Java对象时,一般都会把鱼这个对象相关联的其他Java对象也都加载到缓存中,以方便程序的调用.但很多情况下,我们不需要加载太多无用的对象到缓存中,一来会占用大 ...

  8. Leetcode 之Length of Last Word(37)

    扫描每个WORD的长度并记录即可. int lengthOfLast(const char *s) { //扫描统计每个word的长度 ; while (*s) { if (*s++ != ' ')/ ...

  9. MiCode 40: 找小“3”

    题目链接 这道题真的是zjb恶心, 看其起来像是个数位dp, 然而我并不会数位dp.然后就xjb乱写了个雷类似于动态规划的玩意, 然后调出了\(9\times 9 = 81\)种Bug, 终于过了. ...

  10. mysql远程访问cannot connect(10038) 问题解决的过程

    今天用Navicat访问虚拟机上的mysql,无法访问报cannot connect(10038). 首先看是否可以telnet,本机cmd,telnet 192.168.209.128 3306,结 ...