PICKER
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