for i:=0 to GroupBox4.ControlCount-1 do
begin
if GroupBox4.Controls[i].ClassType=TLabel then
(GroupBox4.Controls[i] as TLabel).Enabled:=not (GroupBox4.Controls[i] as TLabel).Enabled;
if GroupBox4.Controls[i].ClassType=TEdit then
(GroupBox4.Controls[i] as TEdit).Enabled:=not (GroupBox4.Controls[i] as TEdit).Enabled;
if GroupBox4.Controls[i].ClassType=TCombobox then
(GroupBox4.Controls[i] as TCombobox).Enabled:=not (GroupBox4.Controls[i] as TCombobox).Enabled;
if GroupBox4.Controls[i].ClassType=TDateTimePicker then
(GroupBox4.Controls[i] as TDateTimePicker).Enabled:=not (GroupBox4.Controls[i] as TDateTimePicker).Enabled;
end;