 ' Copy and paste into your program
declare sub sel
declare sub selected
CREATE Form AS QFORM
    Caption = "Rapid-Q Code Viewer"
    Width = 395
    Height = 304
    Center
    create a as qmainmenu
         create b as qmenuitem
          caption="select"
          onclick=sel
         end create
    end create
    create sg as qstringgrid
      top=50
      left=50
    end create
    create c as qlistbox
      onclick=selected
      visible=0
    end create
 
END CREATE
dim t as byte
''put something in the header for example
for t= 1 to 3
 sg.cell(1,0)="Product"
 sg.cell(2,0)="Count"
 sg.cell(3,0)="Price"
next t
 
'Insert your initialization code here
 
Form.ShowModal
sub sel
 c.visible=1
 dim t as byte
 for t=1 to 10:''numbers of collumns you used, you can also use the rowcount (<256!)
   if sg.cell(t,0)<>"" then 
     c.additems(sg.cell(t,0))
   else
     c.additems ("column "+str$(t))
   end if    
 next t
end sub
sub selected
  c.visible=0
  showmessage str$(c.itemindex+1)
end sub

 
'With kind regards Marco
