Código Delphi
[-]procedure TForm1.Button1Click(Sender: TObject);
var
I:Integer;
Agrupa:array[1..6]of integer;
begin
for i:= 0 to High(Agrupa) do
begin
Agrupa[i]:=0;
end;
for i := 1 to Panel1.ControlCount - 1 do
begin
if (Panel1.Controls[i] as TCheckBox).Checked then
Agrupa[i] := i + 1;
end;
for i:= 1 to High(Agrupa) do
begin
ShowMessage(IntToStr(Agrupa[i]));
end;
end;
Este otro ejemplo me funciona también.
Un Saludo.