Hi
in pure QBasic
here a simple demonstration about how to do a scroll-list with selection of some elements.
The input of list is from a file, but it can be changed at your need.
The input of user is keyboard, but it can be expanded at your need to mouse and joystick.
The output is an ASCII boxed scrollable list, but it can be changed in graphic primitive or graphic images at your need.
in this case I use this method to show the files of a folder.
n = 0
NameFile$ = "filedir.tmp"
Shell "dir /b> " + NameFile$
n = n + 1
S(n) = " "
Upper = n
'AllList Upper
ChoiceList Upper, wide
Nofile:
Print " Error "; FileName$
+ " not found!"
a = 0
k$ = ""
' 183 · 186º 189 ½ 196 Ä 211 Ó 214 Ö
' here is the output of list
' here is the user input from keyboard
' it switches the selector
' down
'up
'Return
' debug SUB to show the whole list
Happy Coding in the New Year!
PS: QB64 beats QBasic for NOT get back a QBasic Parser bug:
If you DIM a string array suffix, if you SHARED that string array from into the SUB, you cannot use the suffix for define datatype but you must use AS.
Doing so you fall in Parser error that alert you; SUB shared variable isn't declared at main module! LOL
Instead QB64 recognizes that the same name with or without suffix are the same if declared as the same type of data.
Here the issue of Qbasic showed in code.