{ON_CHAR}

Syntax

{ON_CHAR=Event_Name_*}

Argument

Type

Description

Event_Name

C

A value for a_dlg_button that the event handlers in the %code% section to respond to.

Description

The {ON_CHAR} command allows you to capture printable keystrokes. Contrast with {ON_KEY} which lets you trap non-printable keys, such as F2, or PAGE UP, or CTRL END.

Supported By

Alpha Five Version 5 and Above

Limitations

Desktop applications only

Example

dim list as C

ui_dlg_box("{ON_CHAR}",<<%dlg%

{on_char=chr_*}

Type a key. The key you typed is shown here.;

[.40,20^#list];

%dlg%,<<%code%

if left(a_dlg_button,4) = "chr_" then

list = list + crlf() + substr(a_dlg_button ,5)

list = remove_blank_lines(list)

a_dlg_button = ""

end if

%code%)

See Also

Xdialog Commands, {ON_KEY}