Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recurse through all controls
Message
De
18/05/2004 07:28:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00904798
Message ID:
00904859
Vues:
19
>Has anyone got a good tight routine that recurses through all controls on a form, including containers, pageframes etc. ?
>
>I keep coming up with code that looks too ugly to be doing it smart ! :)

If you're in VFP 7 or later, you can use the Objects property. This is untested, but should give you the idea:
FUNCTION Process
LPARAMETERS oControl

* Do whatever to oControl

IF PEMSTATUS(oControl, "Objects", 5)
   FOR EACH oObject IN oControl.Objects
      This.Process(oObject)
   ENDFOR
ENDIF
Oh, and the verb you're looking for is "recur," not "recurse."

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform