Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I Disable all the textboxes in a form?
Message
De
17/02/1999 08:11:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00187810
Message ID:
00188332
Vues:
16
>>Before using code like this in more than a place or two, you should consider writing a custom form.DoSetAll (or something routine) that recognizes a container object in the controls collecitons and recurses back into itself to loop through the container's controls colleciton as well.
>
>I also thought about the possibility that all my container classes would at some point have a custom MySetAll method, accepting the same parameters as SetAll except assuming the third was a base class, and using my original loop. Forms which contained these container classes could know about those methods without violating OOP rules, right?

IMHO, yes, this is Ok. But your original loop won't always be enough; it won't account for nested pageframes or containters inside pageframes or vice-versa. This is really only generically solvable IMHO with a recursive routine.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform