Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form - Controls
Message
De
08/08/2002 04:22:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00686734
Message ID:
00687409
Vues:
31
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform