PICKLIST

Purpose:

Displays a list and returns the item selected by the user, using the native GUI.

Syntax:

PICKLIST(

"title", "prompt", "default", pickonly, multi, sort, "list1", ..., "listN")

"title"

-

A string, the text to be placed on the title bar.

"prompt"

-

A string, the text to be displayed as an input prompt.

"default"

-

A string. The default text result.

pickonly

-

Optional. An integer, the selection mode:

0:

Allow values to be entered that are not in the list (default).

1:

Constrain input to the provided list.

multi

-

Optional. An integer, allow multiple return values:

0:

Return a single value (default).

1:

Return multiple values as a comma separated list.

sort

-

Optional. An integer, sort the list:

0:

Do not sort.

1:

Sort in ascending order (default)

2:

Sort in descending order.

"listN"

-

One or more strings. A list of items to select from.

Returns:

The item selected as a string.

Example:

picklist("Open", "Select:", " " , 1, "A", "C", "B")

 

creates a picklist with three options, "A", "B" and "C", where only one value may be returned.

Example:

picklist("Open", "Select:", "B" , 1, 1, "A", "C", "B")

 

Same as above, except multiple values can be returned as a comma separated string and the default value is set to B.

Example:

picklist("Open", "Select:", "B" , 1, 1, "A", "C", "B")

 

Same as above, except the list is sorted in descending order.

Remarks:

The list can be provided by other functions such as STRFILE and STRLIST. The appearance of the PICKLIST is system dependent.

See Also:

INPUT

MESSAGE

OBJECTLIST

PICKFILE

PICKUNITS