下午好,如果我错过了一些简单的事情,请道歉。
我在DCL对话框中有一个列表框,我想创建一个按钮来选择列表中的所有项目。我找到了一个解决方案,它突出显示了所有列表,但如果有意义的话,它似乎不会选择它们。只是想知道我哪里出错了。
由于我从其他来源复制了这篇文章的一部分,在我完成这篇文章之前还没有完全归功于它们,如果可以的话,我只想在下面发布相关部分?
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;Part of DCL File:
- " : row { "
- " : list_box { label = "Select Tag(s)"; key = "tags"; multiple_select = true; }" ;;List box populated elsewhere
- " }"
- " : row { "
- " : button { key = "ButSEL"; label = "Select All Tags"; }" ;;Select All Button
- " }"
- ;;.......
- (action_tile "tags" "(setq tagreturn $value)")
- (action_tile "ButSEL" "(c:SEL_ALL)") ;;When button ButSEL pressed run routine SEL_ALL below.
- ;;.......
- (setq tagreturn ;;create tag list into tagreturn (I think)
- (if (= 1 (start_dialog))
- (mapcar '(lambda ( x ) (nth x l)) (read (strcat "(" tagreturn ")")))
- )
- )
- tagreturn
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;This Select all routine doesn't quite work. it highlights the list items but doesn't select them
- (defun c:SEL_ALL ()
- ;;(set_tile "tags" "0 1 2 3 4 5 6") ;;simple only highlights the items, not selects them
- (setq acount 0) ;;Use a loop
- (repeat 50 ;;How to count the length of the list and use here?
- (set_tile "tags" (itoa acount)) ;;Again only highlights the items and not selects them
- (setq account (acount + 1))
- )
- )
(我曾尝试将上述内容包装在代码标签中,但它不想对我起作用,有什么想法吗?为什么不?) |