Multi-Select List Box Control

Syntax

[%M% Width, Height Variable_Name ^# Choices [ ! Event ][ ? Enabled ] ]

Arguments

%M% ^#

Character. The leading [%M% and trailing ] and ^# characters are required.

Width

Numeric. The width of the control.

Height

Numeric. The height of the control.

Variable_Name

Character. 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

Character. See Choices Syntax.

Event

Character. Optional. See Event Syntax.

Enabled

Logical. Optional. See Enabled Syntax.

Description

By including the %M% directive in the definition of a list box, you convert the list box from a single-select to a multi-select control. For example, the following script allows you to select multiple cities:

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

Example 

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

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;

%dlg%)

Limitations

Desktop applications only

See Also