This content has been marked as final. Show 4 replies
The problem is with your i loop.
Your condition is that i<4. Since i starts at 1 the loop will only run 3 times. You either need to start i as 0, or use i<=4.
I tried that and I get the same problem as I do if I make i<5. The 3 rows of three are fine and then I get an instant(s) of the attached buttons at 0,0 in the frame. I'm totally baffled. There are 12 items in the array and it reads 9 of them if
I make it 3 across and 4 down instead of the total 12 it should read.
In your current code, if you do a quick trace of the count variable, you'll see that it only gets to 9, which is why only 9 items are being read from the array. Set a break point at the top of your function and use the debugger to step through each iteration of the loop, that way you should be able to see where things go wrong in regards to positioning.
Good idea. You see the problem. I'll give it a try. Thanks for your help.