cutting down on the clicks

cutting down on the clicks

Bernard.WattsPRTKU
Explorer Explorer
269 Views
1 Reply
Message 1 of 2

cutting down on the clicks

Bernard.WattsPRTKU
Explorer
Explorer

Given: A simple dialog box with one List and Cancel button.  The attribute multiple_select = "false"

Can the pick item from the list tile also be the automatic, OK?  

I thought I read somewhere that it can be done but the syntax eludes me.

BernardWattsPRTKU_0-1711110560057.png

DCL_settings : default_dcl_settings { audit_level = 3; }
tryforautoOK : dialog { label = "List of stuff toggle";
: list_box { label = "stuff list:";
     key = "stufflst";
     multiple_select = false;
     width = 32;
     height = 10;   }/* list_box */
: button {
        label           = "Cancel";
        key             = "cancel";
        alignment       = centered;
        fixed_width     = true;
        is_cancel       = true;  }
}
 
*.lsp bit:
...
(new_dialog "list_select" (setq d (load_dialog fn)))
(start_list "stufflst")
(mapcar add_list stufflst)
(end_list)
(setq item (set_tile "stufflst" "0"))
(action_tile "stufflst" "(setq usrpik $value)")
(start_dialog)
(unload_dialog)
...

 

Thank you.

B, Watts

0 Likes
Accepted solutions (1)
270 Views
1 Reply
Reply (1)
Message 2 of 2

komondormrex
Mentor
Mentor
Accepted solution

$reason = 4 -> double-click with done_dialog

 

(action_tile "stufflst" "(cond
							((= 4 $reason) (setq usrpik $value) (done_dialog 1))
							(t (setq usrpik $value))
					     )"
)

 

or just done_dialog

 

(action_tile "stufflst" "(setq usrpik $value) (done_dialog 1)")