Message 1 of 6
popup_list and list_box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want each color FRUIT CARS in a different list_box and just the size of the text // DCL definition myTest : dialog { label = "Test list controls"; : list_box { key = "listbox"; width = 20; } : popup_list { key = "popup"; width = 20; } ok_only; } ;; LISP code (defun populate_list (tile item lst) (start_list tile) (mapcar 'add_list (cadr (nth item lst))) (end_list) ) (defun listtest () ;; set up data (setq myList '(("FRUIT" ("APPLES" "ORANGES" "PEARS")) ("COLORS" ("RED" "GREEN" "BLUE")) ("CARS" ("VW" "CHEVY" "FORD")) ) ) (setq dcl_id (load_dialog "testdlg.dcl")) (cond ((new_dialog "myTest" dcl_id) ;; fill "popup" with CAR item of myList (start_list "popup") (mapcar 'add_list (mapcar 'car myList)) (end_list) ;; fill "listbox" initially, according to default value of "popup" ;; (value of "0" unless otherwise specified in the dcl definition) (populate_list "listbox" 0 myList) ;; define callback to populate "listbox" according to ;; users choice in the "popup" tile (action_tile "popup" "(populate_list \"listbox\" (atoi $value) myList)") (start_dialog) ) ) )