# Browser (leaf, event)

A browser on a collection of text strings.

Contents (`Items` takes precedence):

Items `GP`
  (TextList)
  The contents of the browser.
  Example: `(Items "red" "blue")`. When this property is accessed at runtime, the TextList is passed a single text string, with `\n` used to separate entries. `GetTextProperty` replaces the entire contents of the browser and sets the selection to `NIL`. `PutTextProperty` returns the elements in the browser, from top to bottom.
From
  (Text)
  If present, names a resource from which the initial browser contents will be taken.

Choices (`Value` takes precedence):

Value `GP`
  (Integer, `-1`)
  The position of the selected item. `0` means the first item; `-1` means no item is selected.
Select `GP`
  (Text)
  The text of the selected item. `PutTextProperty` selects the first matching item if there is one; otherwise it selects nothing. `GetTextProperty` returns the text of the selected item, or `NIL` is there is no selection.

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. Clicking selects the item under the mouse. Double-clicking on an item generates an event on the second up-click. If `Quick` is true, single-clicking on an item generates an event on the up-click.
Shape
  At minimum, large enough to hold its scrollbar plus the single string `"XXXX"` in the font being used. Infinitely stretchable in both dimensions.
See Also
  MultiBrowser