| Object Controls |
|
| Prior Next | |
|
The control property 'ObjectID is used to associate an Object with a control in order to create a Object Enhanced Control. By setting this control property to the handle of an existing object, all subsequent property references and control directives will be checked against the property and methods that the object provides.
| |
|
Example: |
A simple object to enhance a GRID control
Once this object is instantiated, it can be assigned to the Grid control 'ObjectId property at which point all property requests will be filtered through the object.
For the purposes of this example, the Object attaches itself to the control passed in on the NEW function. This is not required; instead, the application could simply have created the control, then the object and linked the Object to the control by setting 'ObjectId
Once the above logic is executed the application can then issue calls to GRD_NO'GetValue $() and GRD_NO'SetValue ( ) to access the grid values. In addition any GRID WRITE directives applied to GRD_NO will invoke the method WRITE within the object.
|
| *Note* |
When a control is removed from the system and 'ObjectID is non-zero, the Object it identifies will be automatically de-referenced (dropped). |
|
| |
| Prior Next |