NAME: picker PURPOSE: Widget for selecting a text item from a list. DESCRIPTION: This widget provides a simple mechanism for selecting a single item from a list. The items are all strings and the return from this call is the string selected. CATEGORY: Widgets CALLING SEQUENCE: result=picker(text_array) INPUTS: text_array - String array of items to present for selection. OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: GROUP: The widget ID of the widget that calls PICKER. When this ID is specified, a death of the caller results in the death of the PICKER widget application. SORT: Flag, if set causes input to be sorted in selection list. Duplicates are NOT weeded out. This function keeps track of which one you select but you might not be able to tell the difference. TITLE: A scalar string to be used for the window title. If it is not specified, the default title is "Select from list" YSIZE: Number of lines of list to show before scrolling the list. The default is 10. OUTPUTS: Return value is the selected string. If the operation was canceled, then the return value is "[[[CANCEL]]]" KEYWORD OUTPUT PARAMETERS: INDEX: index of the item chosen COMMON BLOCKS: MWB_PICKER: COMMON block that maintains state for the widget. SIDE EFFECTS: This function initiates the XMANAGER if it is not already running. RESTRICTIONS: Only one instance of the PICKER widget can be running at one time. PROCEDURE: Create and register the widget and then exit, returning the filename that was picked. MODIFICATION HISTORY: 96/06/09 - Written by Marc W. Buie 96/11/11 - MWB, added SORT keyword