SetAll
This is a very cool method. It lets you change the same property of many objects at once. Of course, there are a few rules.
Usage |
oContainer.SetAll( cProperty, uValue [, cClass ] ) |
Parameter |
Value |
Meaning |
cProperty |
Character |
The property to be changed. |
uValue |
Expression |
The new value. |
cClass |
Character |
Restrict the change only to members of the specified class. |
Unfortunately, SetAll isn't as cool as it could be. Although you can specify that all objects of a particular class are changed, you can't specify that all objects that have a particular class somewhere in their class hierarchy or even all objects based on a particular base class should be affected. Since we rarely use objects based on the VFP base classes, and work with an assortment of classes derived from each base class, using SetAll to make a change to all the buttons or all the combos on a form is harder than we'd like. |
Example |
* Enable all the text boxes on a form from within a method * of the form This.SetAll("Enabled",.T.,"TextBox") |
See Also |