SELECTBOX

Synopsis
SELECTBOX title choicelist
Description

Displays a dialog box with title as the title bar and choicelist as a list of choices. The dialog also has an "OK" and a "Cancel" button. FMSLogo does not evaluate any further instructions until the user clicks one of these buttons. The commander window is also disabled until dialog is dismissed. If the user presses "OK", then SELECTBOX outputs the index of the selected item (1 for first item, 2 for the second item, etc.) and instruction evaluation continues. If the user presses "Cancel", then instruction evaluation is halted, as if by the HALT command.

Both the title and choicelist inputs must be lists.

Example
SHOW SELECTBOX [Choose Color] [Red Green Blue]
Select green and hit OK
2
SHOW SELECTBOX [Which are colors] [[Red Green Blue] [One Two Three] None]
Select "Red Green Blue" and hit OK
1
See Also
MESSAGEBOX
QUESTIONBOX

SourceForge.net Logo