明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2297|回复: 3

有没有办法得到dcl中list_box复选的选择集?

[复制链接]
发表于 2005-1-20 16:50:00 | 显示全部楼层 |阅读模式
list_box能通过 multiple_select = true;实现复选,可是我怎么都能得到复选的选择集供以后程序调用?


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2005-1-20 17:29:00 | 显示全部楼层
发表于 2005-1-21 07:58:00 | 显示全部楼层
  1. (defun C:ABC (/ A B LHY S_D DCL_ID LHY LST)
  2.    (setq LHY '("Steel" "Concrete" "Wood" "Plastic"))
  3.    (if (< (setq DCL_ID (load_dialog "abc")) 0)
  4.        exit
  5.    )
  6.    (if (not (new_dialog "abc" DCL_ID))
  7.        exit
  8.    )
  9.    (start_list "lb1")
  10.    (mapcar 'add_list LHY)
  11.    (end_list)
  12.    (action_tile "lb1" "(setq b $value)")
  13.    (setq S_D (start_dialog))
  14.    (unload_dialog DCL_ID)
  15.    (if (and (= S_D 1) B)
  16.        (foreach ENT (read (strcat "(" B ")"))
  17.            (setq LST (append LST (list (nth ENT LHY))))
  18.        )
  19.    )
  20.    LST
  21. )  ;|
  22. abc : dialog { //dialog name
  23. label = "multiple_select" ; //give it a label
  24.            : list_box { //define list box
  25.                      key = "lb1"; //give it a name
  26.                    //list = "Steel\nConcrete\nWood\nPlastic";//the list
  27.                  height = 5; //give it a height
  28.                width = 10; //give it a width
  29.                    fixed_width = true; //fix the width
  30.                fixed_height = true; //fix the height
  31.                alignment = centered; //center it
  32.                multiple_select = true; //allow multiple select
  33.    } //end list box
  34. spacer ; //add a space
  35. ok_cancel ; //predefined OK/Cancel button
  36. } //end dialog  |;
 楼主| 发表于 2005-1-21 12:51:00 | 显示全部楼层
谢谢。可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-9-29 20:23 , Processed in 0.180777 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表