Search the Community
Showing results for tags 'dcl list box select all'.
-
Good afternoon and apologies if this is something simple I have missed. I have a list box in a DCL dialogue box, and I want to create a button that selects all the items in the list. I found a solution that highlights all the list but doesn't appear to select them if that makes sense. Just wondering where I am going wrong. Since I am copying parts of this from other sources and haven't yet credited them fully until I get this working, I am just going to post the relevant parts below if that's OK? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;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)) ) ) (I have tried to wrap the above in the code tag but it doesn't want to work for me, any ideas why not?)