Link to home
Create AccountLog in
Avatar of wangzheng
wangzheng

asked on

how to change whole form to gray color

hi, everyone

Is it possbile change the whole form to gray and make all components on the form be unable?

Thanks

Z Wang

Avatar of rfwoolf
rfwoolf
Flag of South Africa image

It would be something like this...

var
 i : integer;
begin
  for i := 0 to Form1.ComponentCont - 1;
  Form1.Components[i].enabled := false;
end;
I said "ComponentCont" but I meant "ComponentCount"
Avatar of wangzheng
wangzheng

ASKER

Delphi IDE said that

Undeclared identifier:'enabled'
ASKER CERTIFIED SOLUTION
Avatar of rfwoolf
rfwoolf
Flag of South Africa image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Maybe not all component have enabled

try
Form1.Components[i].enabled := false;
except
end;