citykunan 发表于 2005-1-20 16:50:00

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

list_box能通过 multiple_select = true;实现复选,可是我怎么都能得到复选的选择集供以后程序调用?


meflying 发表于 2005-1-20 17:29:00

参考,5楼程序


<A href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=15119" target="_blank" >http://bbs.mjtd.com/forum.php?mod=viewthread&tid=15119</A>

龙龙仔 发表于 2005-1-21 07:58:00

(defun C:ABC (/ A B LHY S_D DCL_ID LHY LST)
   (setq LHY '("Steel" "Concrete" "Wood" "Plastic"))
   (if (< (setq DCL_ID (load_dialog "abc")) 0)
       exit
   )
   (if (not (new_dialog "abc" DCL_ID))
       exit
   )
   (start_list "lb1")
   (mapcar 'add_list LHY)
   (end_list)
   (action_tile "lb1" "(setq b $value)")
   (setq S_D (start_dialog))
   (unload_dialog DCL_ID)
   (if (and (= S_D 1) B)
       (foreach ENT (read (strcat "(" B ")"))
         (setq LST (append LST (list (nth ENT LHY))))
       )
   )
   LST
);|
abc : dialog { //dialog name
label = "multiple_select" ; //give it a label
         : list_box { //define list box
                     key = "lb1"; //give it a name
                   //list = "Steel\nConcrete\nWood\nPlastic";//the list
               height = 5; //give it a height
               width = 10; //give it a width
                   fixed_width = true; //fix the width
               fixed_height = true; //fix the height
               alignment = centered; //center it
               multiple_select = true; //allow multiple select
   } //end list box
spacer ; //add a space
ok_cancel ; //predefined OK/Cancel button
} //end dialog|;

citykunan 发表于 2005-1-21 12:51:00

谢谢。可以了
页: [1]
查看完整版本: 有没有办法得到dcl中list_box复选的选择集?