Copyright 2008 Shoptalk Systems

LISTBOX #handle, array$(), height

Description:

Create a listbox and insert it into the page at the current position.  Assign the listbox to the variable #handle.  Use the contents of the array named array$() to populate the listbox, and use the value of height to specify how many line items high the listbox should be.  A height of 1 causes the listbox to become a drop-down list.

Example:

  dim colorChoices$(2)
  colorChoices$(0) = "red"
  colorChoices$(1) = "green"
  colorChoices$(2) = "blue"

  print "Choose a color and click Accept."
  listbox #colors, colorChoices$(), 3
  print
  link #acceptColor, "Accept", [accept]
  print
  wait

[accept]
  print "You chose "; #colors selection$()
  wait

LISTBOX object methods:

#handle SELECT(n) - Set the current selection to be the nth item.
#handle SELECTION() - Return the current selection as a number.
#handle SELECTION$() - Return the current selection as a string.
#handle SETID(expr$) - Set the listbox's id to be expr$.
#handle DEBUG$() - Return the string "LISTBOX".
#handle ISNULL() - Return 0 (or false).