okay. i ahve a question, if any one is willing to help me out.
aim: recreate a dynamic 'lights out'
i want to position controls into a grid like view at runtime, so the result would look something like this:
00 01 02 03 04
05 06 07 08 09
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
now, i thought i could do this with a nested loop statement:
dim i, j, k
i=0 'row
j=0 'column
k=0 'row +column = item number
for i=0 to 4
for j=0 to 4
k=i+j
label(k).left = j * 250 '*250 for horizontal spacing from other controls
label(k).top = i * 250 '*250 for vertical spacing from other controls
label(k).captio = k
next j
next i
so, everytime k was read, it would = 0+0, 0+1, 0+2, 0+3, 0+4, 1+0, 1+1, etc
But, after running that, i only ever end up with something like:
(xx means nothing was here)
00 01 02 03 04
xx xx xx xx 05
xx xx xx xx 06
xx xx xx xx 07
xx xx xx xx 08
or (k=i*j)
00 xx xx xx xx
xx 01 xx xx xx
xx xx 02 xx xx
xx xx xx 03 xx
xx xx xx xx 04
etc
now im stumped.
am i going about this wrong?
thanks in advance.