PS_Port 发表于 2022-7-6 11:33:56

对话框控制语言

walton10 发表于 2022-7-6 11:37:37

有人能给我举个例子,说明如何让全选和全选按钮工作吗?谷歌和AfraLisp让我失望。

TimSpangler 发表于 2022-7-6 11:38:34

 
你在选择什么?单选按钮?复选框?列表框中的项目?

The Buzzard 发表于 2022-7-6 11:42:24

如果您使用对话框插入图例,最好使用弹出列表。

walton10 发表于 2022-7-6 11:47:54

 
我使用了复选框,但切换到了列表框(多个选择)

TimSpangler 发表于 2022-7-6 11:51:52

以下是您可以使用的一些代码:
 

The caller:
(SELECT_ALL \"tile_name\" (length listlength))

The Function:
;;; ------------ SELECT ALL ITEMS IN LISTBOX
(defun SELECT_ALL (Key Count / StartCount Value Count)

(setq StartCount 0)
(setq Value "0")
(repeat (1- Count)
        (setq Value (strcat Value (itoa (setq StartCount (1+ StartCount))) " "))
)
(set_tile Key Value)
)

 
此代码将取消选择列表框中的内容

(set_tile "tile_name" "")

 
您需要确保在取消选择内容时将列表变量设置为nil。
 
 
HTH公司

walton10 发表于 2022-7-6 11:54:12

谢谢,这直接解决了我的问题。我感谢你的帮助!
页: 1 [2]
查看完整版本: Dcl布局帮助