if user was wanting to enable/disable a single control/ panel or form then I thought this little routine may help, I have not fully tested but so far so good.
procedure tForm1.Controls_Enabler(Control: TControl;aValue:Boolean);
var i: integer;
WinControl: TWinControl;
begin
with Control do
begin
Control.enabled:=aValue;
if Control is TWinControl then
begin
WinControl := TWinControl(Control);
If WinControl is TPanel Then
begin
for i := 0 to WinControl.ControlCount - 1 do Controls_Enabler(WinControl.Controls[i],AValue);
end;
end;
end;
application.ProcessMessages;
end;
Also a zip of test application showing its use.
usage Controls_Enabler(control,*required state*);
if control is a panel it goes through controls on panel to do set all controls to required state; same for a form.
Caution if used on a form all controls are effected ie, timers etc, so some tweeking for user case would be needed; Can't reaaly see use on form basis; but tested ok.
Maybe overkill