Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling all controls on a form
Message
 
 
To
22/01/2002 19:47:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00608728
Message ID:
00608741
Views:
18
>I've seen this somewhere before, but I can't locate it in any of my reference books. How can you, e.g. disable all the controls on a form? Isn't it something like
>
>FOR EACH xxxx IN ThisForm
> xxxx.ENABLED = .F.
>ENDFOR
>
>Sorry to bother y'all for this elementary question, but I just can't find or figure out the answer.

For the controls on the form
Thisform.setall("Enabled", .f.)
* or
FOR EACH loControl IN Thisform.Controls
  IF PEMSTATUS(loControl ,"Enabled",5) && Does the enabled property exist?
     loControl.Enabled = .F.
  ENDIF
ENDFOR
You'll have to add more complicated logic to drill further down if there are containers on the form.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform