>Is there a way to create a double dimensioned array of items such as checkboxes. I am attempting to make a calendar control and it would be alot easier to set my "grid" of 6 rows by 7 columns properties accordingly using an array instead of physically coding ... "thisform.box1.caption="1", thisform.box2.caption="2",... and using something line "thisform.box(r,c).caption=counter". Any suggestions?
>
>Thanks
Yes you can. Add a property to the form with the name Box(1). Place all of your checkboxes in a container. In the container's Init do this;
WITH Thisform
DIMENSION Box(6,7)
.Box(1,1) = This.chkBox1
.Box(1,2) = This.chkBox2
.Box(1,3) = This.chkBox3
.Box(1,4) = This.chkBox4
.Box(1,5) = This.chkBox5
...
ENDWITH
Now you can iterate through the checkboxes with;
WITH Thisform
FOR x = 1 TO 6
FOR y = 1 TO 7
.Box(x,y).Value = Whatever
ENDFOR
ENDFOR
ENDWITH