Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to disable all controls with TAG property = 'X'
Message
From
16/05/2002 15:54:43
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00657662
Message ID:
00657747
Views:
27
The FOR EACH loControl routine works well only for 1st level controls. Nested controls are not tested. I have lots of nested controls (inside a pageframe, inside a container, etc). THe SETALL() function looks promising since it sees all controls regardless of nesting. But how do you set it so that it only set the control to be disabled when control.TAG='X'?
SETALL('enabled',.f.) will disable all controls, not just the ones with .TAG='X'. ??? Thank you!!!


>Hi,
>
>Try this in a method:
>

>For Each loControl in ThisForm.Controls
> IF loControl.TAG = "X"
> loControl.Enabled = .F.
> ENDIF
>ENDFOR
>

>
>OR
>
>

>ThisForm.SetAll('Enabled', .F.)
>

>
>HTH,
>Arriyel
>
>>I'd like to disable all controls in a form if its tag property = 'X'. Is there an easy way to do this? Thank you all!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform