Initializing a tile can include the following:
- Making it the initial keyboard focus of the dialog box
- Disabling or enabling it
- Highlighting its contents, if it is an edit box or image
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.