var
ctr: TComponent;
i: Integer;
begin
with form do
begin
for i := ComponentCount - 1 downto 0 do
begin
if Components[i] is TPanel then
begin
if id in [0, 1] then
(Components[i] as TPanel).ControlStyle := (Components[i] as TPanel).ControlStyle - [csParentBackground];
end
else
if Components[i] is TGroupBox then
begin
if id in [0, 2] then
(Components[i] as TGroupBox).ControlStyle := (Components[i] as TGroupBox).ControlStyle - [csParentBackground];
end;
end;
end;
end;