Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form - Controls
Message
From
08/08/2002 04:22:32
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00686734
Message ID:
00687409
Views:
32
>Here is a more compact code that doesn't require adding new class to your project
>
>****************
>with Thisform
> for lnThisControl = 1 to .controlcount
> if .controls[lnThisControl].controlsource='X'
> .controls[lnThisControl].backcolor=255,255,0
> endif
> endfor
>endwith
>****************

You are right, it might do the job :-)

But if I am not mistaken, this will not scan trough nested containers but only first 'level' of controls. At least this was the case until VFP6. Maybe something changed with VFP7.

Solution I hv given is generic and can be used for any purpose
and applies to any containership composition.
I am using it as regular part of my framework for validation,
and in many other cases for other purposes.

Main advantage is that if guy tmrw decide to add some container on the form this way he would not hv to change anything.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform