Hi,
I'm using the following code to loop through 4 checkboxes situated in groupbox7. However the compiler won't let me do:
if (chk.checked ) then begin
Anybody got an idea?
Many thanks
Albert
var
chk: Tcontrol;
k:integer;
for k:= 0 to (unit2.Form2.GroupBox7.ControlCount -1) do begin
if unit2.Form2.GroupBox7.Controls[k] is Tcheckbox then begin;
chk:= unit2.Form2.GroupBox7.Controls[k];
if (chk.checked ) then begin // <--------- here's the problem line
do stuff etc.
end;
end;
end;