Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I Disable all the textboxes in a form?
Message
From
17/02/1999 08:11:47
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00187810
Message ID:
00188332
Views:
17
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform