OK so i have about 30 checkboxes in my form and on a button press i want to be able to check which of each check box is check and store a 1 inside if it is check or a 0 if it is not checked inside a 30 integer wide array. I want to do this in a simple loop but i dont know how to loop through each check box. The checkboxes are named cb1,cb2,cb3,cb4...,...cb30.
Heres my current code:
This gives me an error cause I just dont know if its possible to loop through the checkboxes cb[1..30] in anyway?PHP Code:for icb:= 1 to 30 do
begin
if (cb[icb].checked) then begin
ItemControlArray[icb]:=1;
end else begin ItemControlArray[icb]:=0; end;
end;


Reply With Quote



