The !PICKLIST() subroutine displays a list of entries from which a user may select one.
CALL !PICKLIST(value, list, return.col, index.col)
The !PICKLIST() subroutine displays a box containing the items to from list. The user can use the up and down cursor keys to move through this list. If the list is longer than can be displayed, the subroutine will scroll the displayed items. The page up and down key can be used to move rapidly through the entries. The return key selects the current item, returning it in the value argument.
If index.col is non-zero, the user may enter the initial characters of an entry in the chosen column to position directly to the first entry starting with the entered prefix. The characters entered are displayed in the lower border of the box.
When used on a QMTerm or Windows QMConsole session or on a terminal that supports screen region save and restore, the area of the screen overwritten by the pick list box is automatically saved and restored. Programs using other terminal systems will need to arrange their own system to recover the screen.
LIST = 'Blue':@FM:'Green':@FM:'Red'
CALL !PICKLIST(ITEM, LIST, 1, 1)
DISPLAY 'Selected item was ' : ITEM