List Box (Single Field Multi-Column) Control Syntax

Syntax

[%C=CW.TCW[;H]%Width["],Height["] Variable_Name^#Choices[!Event][?Enabled]]

Note: You must not have any space characters in the finished command, except those that may be inside entries in the Choices list.

Argument

Type

Description

[%C % ^# ]

C

The leading [%C% and trailing ] and ^# characters are required.
CW

N

Column width in characters.
TCW

N

Total width in characters of all columns.
;H

C

Enables horizontal scrolling.
Width

N

The width of the control.
Height

N

The height of the control.
Variable_Name

C

The name of a character variable to receive the user selection, or a numeric variable to receive the index value of the selected radio button. The index of the top-most button is 1.
Choices

C

See Choices Syntax. You must either use the use {DATA} command or the K Directive to preserve the formatting of selected items.
Event

C

Optional. See Event Syntax.
Enabled

L

Optional. See Enabled Syntax.

Description

One or more Multi-Select List Box objects may appear inside the Format section of a UI_DLG_BOX() function. The selections are stored in the %mw% variable.

Note: You must have an Event if you want to respond to the user's selection in the Code section of the dialog box.

Example

For example, the following script allows you to select multiple cities: [Picture]

cities = <<%dlg%

Atlanta

New York

Los Angeles

Boston

Johannesburg

Sydney

%dlg%

ui_dlg_box("Multi-Select List Box",<<%dlg%

{wrap=30}

[%M%.30,5cities_chosen^#cities];

{line=1,0};

This variable shows what entries in the above list box are selected.;

[%mw%.30,5cities_chosen];

<OK>

%dlg%)

This example changes the justification of alternate rows: [Picture]

list = <<%txt%

Amount

{J=R}$7.23

Balance

{J=R}$2.34

%txt%

ui_dlg_box("test","[%O={@@}%.30,20selected^#list]")

See Also

Xdialog Language Directives and Operators, Xdialog Control Reference

Supported By

Alpha Five Version