[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ListBox
 Create a list box
------------------------------------------------------------------------------
 Description

     A list box displays a list of strings (or items) to the user.  You can
     use the methods of ListBox to add, arrange, remove, and interrogate the
     items in a list box.

 Examples

     .  This example shows how the user can select the screen's
        foreground color:

        function SelectFore()
        local cOldWindow, oList, nChoice
        memvar GetList
           cOldWindow := SaveScreen(5, 10, 12, 20)
           oList := ListBox(5, 10, 12, 20, { | x | iif(x == NIL,;
              nChoice, nChoice  := x })
           oList:addItem("Black", "N")
           oList:addItem("Blue", "B")
           oList:addItem("Green", "G")
           oList:addItem("Cyan", "BG")
           oList:addItem("Red", "R")
           oList:addItem("Magenta", "RB")
           oList:addItem("Brown", "GR")
           oList:addItem("White", "W")
           aAdd(GetList, oList)
           read
           RestScreen(5, 10, 12, 20, cOldWindow)
        return (oList:GetData(nChoice))

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson