Page 1 of 1

Object StringGrid : an error (?)

Posted: Sun Feb 28, 2010 8:08 pm
by PaPi
Hi all, see you please my program:

CODE:
stringgrid2_test  by PaPi  28.02.2010
object myform as form
     autosize=true
     onactivate=main
     object SG as stringgrid
           colcount=4
           rowcount=8
           height=220
           width=280
     end object ` sg
end object ` myform
myform.ShowModal

`------------------------------------------------------
sub Main()
     dim i as integer, j as integer
     for i=0 to SG.colcount
           for j=0 to SG.rowcount
                 sg.cell(i,j)=str$(i)+str$(j)
           next j
     next i
     showmessage SG.text ` this statement give bad result in the last row. WHY???
end sub ` Main

CODE END

What is it? Why is bad the last row in SG.text  ???

PaPi

Object StringGrid : an error (?)

Posted: Mon Mar 01, 2010 7:11 am
by PaPi

This error don`t wanting in new beta version FNXBASIC download jan-2010.
PaPi


Object StringGrid : an error (?)

Posted: Mon Mar 01, 2010 1:42 pm
by fred
A count of say 10 means from 0 - 9 so 0 to count-1