MultiBrowser (leaf, event)

A browser on a collection of text strings that allows multiple items to be selected.


Contents (Items takes precedence):
Items
(TextList)
The contents of the browser.
Example: (Items "a" "b" "c")
From
(Text)
If present, this names a resource from which the initial browser contents will be taken, one item per line.

Initial choices (Value takes precedence):

Value
(CardinalList)
The positions of selected items.
Example: (Value 1 3 5 2).
Select
(TextList)
The list of initially selected items.
Example: (Items "c" "a")
Quick
(Boolean, FALSE)
If true, every selection action is reported as an event. Otherwise, only double-click actions are reported.

Behavior
Displays items vertically, with a scrollbar at the left. The left button modifies the selection: If the item under the cursor is not currently selected, it becomes selected; if it is currently selected, it is deselected. Dragging sets the state of the additional items to the state it gave to the first item. Middle and right buttons clear any existing selection, and select the item under the cursor. Dragging selects additional items as the mouse passes over them; retreating unselects items. Autoscrolling is implemented, and it continues to select or unselect items as they scroll by.
When Quick is true, every selection action also generates an event, on the up-click. Otherwise, an event is not generated until the second up-click of a double-click.
Shape
At minimum, large enough to hold its scrollbar plus the single string "XXXX" in the font being used, plus a shadow. Infinitely stretchable in both dimensions.
See Also
Browser