up: AutoCAD - Dialog Control Language (DCL)  
AutoCAD - Dialog Control Language (DCL)
(action_tile key action-expression)
What links here?
Assigns an action to evaluate when the user selects the specified tile in a dialog box

(action_tile key action-expression)


The action assigned by action_tile supersedes the dialog box's default action (assigned by new_dialog) or the tile's action attribute, if these are specified. The expression can refer to the tile's current value as $value, its name as $key, its application-specific data (as set by client_data_tile ) as $data, its callback reason as $reason, and its image coordinates (if the tile is an image button) as $x and $y.

Arguments
key
A string that names the tile that triggers the action (specified as its key attribute). This argument is case-sensitive.
action-expression
A string naming the expression evaluated when the tile is selected.

Return Values
Returns T

The $reason variable will be one of:
1This is the value for most action tiles. The user has selected the tile (possibly by pressing Enter, if the tile is the default and the platform recognizes accelerator keys).
2Edit boxes: The user has exited the edit box, but has not made a final selection.
3Sliders: The user has changed the value of the slider by dragging the indicator but has not made a final selection.
4List boxes and image buttons: This callback reason always follows a code 1. It usually means “commit to the previous selection.” It should never undo the previous selection; this confuses and annoys the user.


For text boxes, the action-expression is evaluated when the focus leaves the text box.

Sample:
(action_tile "accept" "(do_exit)")


The quotes around the key and action-expression are essential.

(action_tile "myeditbox" "(edit_action $value $reason)")


This sample shows the use of the special variables.
AutoCAD - Dialog Control Language (DCL) - (action_tile key action-expression)
tk:tk_frame
tk:tk widgets
AutoCAD Entity Definitions - text
programming - c - functions - atoi
programming - c - functions - itoa
programming:Excel
programming:c:strftime
AutoCAD Entity Definitions - circle
programming - C - localtime
programming:windows:Button Notification Messages
Raspberry PI - add a network printer
tk:tk_entry
programming - C - function putch(int char)
AutoCAD Entity Definitions - attribute definition
tk
programming:cpp
programming:windows:SetWindowPos
filename:AutoCAD - Dialog Control Language (DCL) - (action_tile key action-expression)
filename:AutoCAD%20%2D%20Dialog%20Control%20Language%20%28DCL%29%20%2D%20%28action_tile%20key%20action%2Dexpression%29
last edit:August 02 2013 01:20:06 (4872 days ago)
ct = 1796429706.000000 = December 05 2026 00:15:06
ft = 1375406406.000000 = August 02 2013 01:20:06
dt = 421023300.000000