Object StringGrid : an error (?)

In this category you can exchange your programming questions and solutions.
Post Reply
PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

Object StringGrid : an error (?)

Post: # 613Post PaPi
Sun Feb 28, 2010 8:08 pm

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

PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

Object StringGrid : an error (?)

Post: # 614Post PaPi
Mon Mar 01, 2010 7:11 am


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


fred
Posts: 54
Joined: Thu Apr 23, 2009 10:08 am

Object StringGrid : an error (?)

Post: # 615Post fred
Mon Mar 01, 2010 1:42 pm

A count of say 10 means from 0 - 9 so 0 to count-1

Post Reply