Displays a dialog with a multiple-selection listbox.
Syntax: @uimlist(arg, prompt, items)
arg: vector
prompt: string
items: string
Return: integer
Displays a dialog with a listbox and prompt string that will be used to label the listbox.
• arg should be an vector object as it is used to return results. arg is used to provide initial selections, and will contain the dialog specified values on return. On intialization and return arg should contain the index values of the items in the listbox that are selected. If no items are selected arg will be a one element vector containing the value -1.
• prompt specifies the text used to label the listbox.
• items is a space delimited list of items in the listbox.
Both prompt and items may be specified using in-line text.
The dialog shows an OK and Cancel button, and will return an integer representing the button clicked: Cancel (-1), OK (0).
Examples
vector(2) selected
selected.fill 1,3
@uimlist(selected, "Please select an item:", "Item1 Item2 Item3")
These commands display a dialog with a multiple listbox containing the items “Item1”, “Item2”, and “Item3”. The title “Please select an item:” appears above the listbox, and the first and third items are initially selected. If the user additionally selects the second item and presses OK, the vector SELECTED will contain the elements 1,2,3, and the dialog will return the value 0.
@uimlist(selected, "Please select an item:", "Item1 Item2 Item3")
If no items are selected in the dialog, SELECTED will be a one element vector containing the value -1.
Cross-references