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!