Here is how to iterate through all the controls on a form, this is very useful for setting a property value of more than one control, for example the enabled property.
procedure IterateControls(AControl: TControl);
if AControl = nil then
if AControl is TWinControl then
for iControl := 0 to TWinControl(AControl).ControlCount - 1 do
// Do Control stuff here
AControl.Enabled := false;
Where you want to set the control property value it is possible to check for the class something like this.
if (AControl is TButton) then
(AControl as TButton).Enabled := false;
And, of course the boolean value can be passed as a parameter to the procedure.