Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I Disable all the textboxes in a form?
Message
 
À
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:
00188352
Vues:
19
>>>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.

OK. Recursion is dangerous but not impossible to manage. Like a skilsaw, very efficient if used properly, just be careful not to cut off your hand! :)

Cheers,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform