DEFINE CLASS Command - Property Definition Clause
Defines properties and their values for the class definition.
[[PROTECTED | HIDDEN] PropertyName1, PropertyName2 ...] [[.]Object.]PropertyName = eExpression ...] |
Parameters
- [PROTECTED | HIDDEN] PropertyName1, PropertyName2 ...]
-
Specifies one or more class properties to create. Properties are named attributes of the class and define characteristics and behaviors for the class. Use commas to separate each property or declare each property on a separate line.
Note All property definitions must appear before function or procedure definitions.
The PROTECTED keyword prevents access and changes to the specified properties from outside of the class definition. Methods and events in the class or subclass definition can access protected properties.
The HIDDEN keyword prevents access and changes to the specified properties from outside of the class definition. However, only methods and events in the class definition, not subclasses, can access hidden properties.
Tip You can create subclasses with Access and Assign methods if you do not include the HIDDEN keyword.
- [[.]Object.] PropertyName= eExpression ...]
-
Assigns default values to class properties. Using
.Object.indicates that Visual FoxPro should apply the value to an ActiveX control property when creating it. For more information, see the Examples section.
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08