You can change row column numbers at will
Cheers
Scorpyo
rem Scorpyo 2013
rem Row-Column Print-Select
set display mode 1024,768,32
sync rate 30
set text opaque
global x,y,xspan,yspan,stripe$,maxrows,maxcolumns,itemcount,columnx,columny
global mousexpos,mouseypos,stripe,mouseypos,mousexpos,yspan,xspan,selection$
rem ---------------------------------------------------------------------
maxcolumns=8:maxrows=50:x=0:y=0:itemmax=maxrows*maxcolumns
itemcount=0:yspan=14:xspan=130
dim stripe$(itemmax)
for n=1 to itemmax
stripe$(n)="----item"+str$(n)+"---"
next n
gosub printdata
Do
gosub selection
sync
Loop
printdata:
for m=1 to maxcolumns
for n=1 to maxrows
itemcount=itemcount+1
text x,y,stripe$(itemcount)
y=y+yspan
next n
y=0
x=x+xspan
next m
sync
return
selection:
set cursor 0,20
mousexpos=mousex():mouseypos=mousey()
if mousexpos<maxcolumns*xspan and mouseypos<maxrows*yspan
columny=int(mouseypos/14)+1
columnx=int(mousexpos/130)
stripe=(columny+columnx+maxrows*columnx)-columnx
stripe$=str$(stripe)
if mouseclick()=1 then selection$=stripe$
if mouseclick()=2 then selection$=" "
text 400,710,"SELECTION Leftmouse=select Rightmouse=deselect"
text 20,710,"mousexpos= "+str$(mousexpos)+" "
text 20,730,"mouseypos= "+str$(mouseypos)+" "
text 200,710,"stripex= "+str$(columnx)+" "
text 200,730,"stripey= "+str$(columny)+" "
text 400,730,"item= "+stripe$+" "
text 500,730,"selected= "+selection$+" "
text 750,730,"content= "+stripe$(stripe)+" "
else
text 400,710,"SELECTION"
text 20,710,"mousexpos= "+str$(mousexpos)+" "
text 20,730,"mouseypos= "+str$(mouseypos)+" "
text 200,710,"stripex= "
text 200,730,"stripey= "
text 400,730,"item= "
text 500,730,"selected= "
text 750,730,"content= "
endif
return
end