List


List L$(),{s$|n}


This command displays a string array as a list on the screen and lets the user select one item from the list.



Here is an example showing how to use a list.

Dim Menu$(6) = "Dinosaurs", "Playing Cards", "99 Bottles of Beer", "Lunar Lander", "Fractional Numbers", "Whole Numbers", "Quit"

TextColor 100,75,10
TextColorA 50,50,50
TextAlign 0
TextSize 20

List Menu$(), Choice

On Choice + 1 Gosub 1000, 1100, 1300, 1400, 2000, 3000, 110



In the example above "Choice" is a numeric variable, so the index of the selected item is returned. If the return variable is a sting, the actual text of the selected item is returned.


Notice that all the text control commands work with the List command. TextColorA is used to set the color of the divider line.


TextAlign x


TextColor r,g,b


TextColorA r,g,b


TextSize x






Become a Patron