{REGION}

Syntax

{REGION[N]} ... {ENDREGION[N]}

{REGION=Label} ... {ENDREGION}

Argument

Type

Description

N

N

Optional. An integer that uniquely identifies the beginning of a region.

Label

C

A text label that uniquely identifies the beginning of a region. The {REGION=Label} syntax attempts to make column widths the same in all regions with the same label.

Description

The {REGION} command is paired with an {ENDREGION} command to identify a sequence of Xdialog commands that should be treated as a single entity, typically as a single cell in a Xdialog. {REGION} and {ENDREGION} commands must be nested, as illustrated below (the indenting is for illustration purposes only).

The {REGION} command is frequently used with the {COL}, {ROW} and {FRAME} commands.

{REGION1}

    {REGION2}

        {REGION3}

        {ENDREGION3}

    {ENDREGION2}

{ENDREGION1}

Note: The {regionN=Label} syntax is not allowed.

Supported By

Alpha Five Version 5 and Above

Limitations

Desktop applications only

Example

The following script uses the {Region} {Endregion} command pair:

result = ui_dlg_box("Title",<<%dlg%

{frame=1,1:Billing}

{region1}

First name:|[.32firstname] ;

Last name:|[.32lastname] ;

Address 1:|[.32address1] ;

Address 2:|[.32address2] ;

City:|[.32City] ;

State:|[State] ;

Zip:|[Zip]

{endregion1}|{sp}|

{frame=1,1:Shipping}

{region2}

First name:|[.32firstname] ;

Last name:|[.32lastname] ;

Address 1:|[.32address1] ;

Address 2:|[.32address2] ;

City:|[.32City] ;

State:|[State] ;

Zip:|[Zip]

{endregion2}|{sp}|

{Region3}

<10&OK>;

<10&Cancel>

{Endregion3}

%dlg%)

This script creates this dialog: [Picture]

This dialog can be thought of as having one row and four columns.

Note also that in this script the {Frame} commands specify one row and one column. This is because the {Region} {Endregion} command pair that encloses the billing and shipping information turns these regions on the dialog into single "logical" cells.

As the following script demonstrates, the billing and shipping regions now have the same column sizes.

result = ui_dlg_box("Title",<<%dlg%

{frame=1,1:Billing}

{region=a}

Customer First name:|[.32firstname] ;

Last name:|[.32lastname] ;

Address 1:|[.32address1] ;

Address 2:|[.32address2] ;

City:|[.32City] ;

State:|[State] ;

Zip:|[Zip]

{endregion};

{frame=1,1:Shipping}

{region=a}

First name:|[.32firstname] ;

Last name:|[.32lastname] ;

Address 1:|[.32address1] ;

Address 2:|[.32address2] ;

City:|[.32City] ;

State:|[State] ;

Zip:|[Zip]

{endregion};

{Region3}

<10&OK> <10&Cancel>

{Endregion3}

%dlg%)

This script creates this dialog: [Picture]

Note that you must include a ';' command after the {Endregion} to begin the next {Region} on a new row.

See Also

{ENDREGION}, UI_DLG_BOX(), {COL}, {ROW}, {FRAME}, {REGION_XMARGIN}, {REGION_YMARGIN}, Xdialog Commands