About Initializing Modes and Values (DCL)

Tile modes and values can be initialized when a dialog box is displayed or when an action is performed.

Note: DCL support in AutoLISP is limited to Windows only.

Initializing a tile can include the following:

These operations are performed by mode_tile calls. You can set the value of a tile by using set_tile.

To display a default value—such as a surname—in an edit box and set the dialog box's initial focus to that box, use the following code:

(setq name_str "Kenobi")       ; Default.
(set_tile "lastname" name_str) ; Initializes field.
(mode_tile "lastname" 2)       ; 2 sets focus to tile.

An additional mode_tile call can highlight all the contents of an edit box, so the user has the option to type immediately over the default contents, as shown in the following example:

(mode_tile "lastname" 3)       ; 3 selects box contents.