Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>listbox</b> http://www.X-Hacker.org [<<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))

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson