@tkraftV8RQQ ,
Maybe this example will help you:
Lisp File:
(defun C:TEST ( / dcl_id)
(setq dcl_id (load_dialog "c:\\myFolder\\mySubFolder\\myfile.dcl")) ; Load the DCL file.
(if (not (new_dialog "mydialog" dcl_id)) ; Initialize the dialog.
(exit) ; Exit if this does not work.
)
;define our items
(setq *myItems* '("Item 1" "Item 2" "Item 3"))
;add items to our List box
(start_list "lstbx_1")
(mapcar 'add_list *myItems*)
(end_list)
;add items to our Popup box
(start_list "popbx_1")
(mapcar 'add_list *myItems*)
(end_list)
;define an action for our button (create a new list in our case)
(action_tile "btn_1" "(progn
(alert \"This button will now update the lists.\")
(setq *myItems* (cons \"Item 9\" (cdr *myItems*)))
(start_list \"lstbx_1\")
(mapcar 'add_list *myItems*)
(end_list)
(start_list \"popbx_1\")
(mapcar 'add_list *myItems*)
(end_list)
(alert \"The Lists have now been updated.\")
)")
;start dialog
(start_dialog) ;Display the dialog box.
(unload_dialog dcl_id) ;Unload the DCL file.
(princ)
);defun
DCL File:
mydialog : dialog
{
label = "My Sample Dialog";
: list_box {
key = "lstbx_1";
label = "My List Box:";
}
: popup_list {
key = "popbx_1";
label = "My Popup Box:";
}
: button {
key = "btn_1";
label = "Update Lists";
}
ok_only;
}
Best,
~DD