Button Syntax

Syntax

< [ %Directives% ][ * ][ Width ][, Height ]. Label [ & ] Label [ = Variable ][ ! Event ][ ? Enabled ] >

Arguments

%Directives%

Refer to Xdialog Language Directives and Operators.

<>

Character. The leading < and trailing > characters are required.

*

Character. Optional. Indicates that this is the default button on the Xdialog.

Width

Numeric. Optional. The width of the control.

Height

Numeric. Optional. The height of the button in units (specified by the {UNITS} command).

&

Character. Optional. Precedes the letter that is the hotkey for the button.

Label

Character. The label of the button. The optional "= Variable " syntax allows you to use the contents of a variable as the button label.

Event

Character. The name of the event generated by the button.

Enabled

Logical. Optional. See Enabled Syntax.

Description

One or more Button objects may appear inside the Format section of a UI_DLG_BOX() function.

Example 

format = <<%dlg%
Hello World
<*Click Here> 
%dlg%
ui_dlg_box("Simple Xdialog", format)

If you need to place ">" or "<" characters in the Enabled expression, they should be preceded by the "\" character. The following example enables the Next button only if the last_name and first_name field have non-null values. Picture

"" .and. first_name\>"")>

See Also