|
The properties, events, and methods of the OLE custom controls can be accessed through PowerScript.
In this simple example two controls have been placed on a Window
- ole_spin, which is a spin button
- ole_meter, which is a progress meter
The spin button exposes a number of parameterized events, including the click event. The event parameters are displayed by selecting the Declare > User Events menu in the Window painter.
Here is the script to change the value of the progress bar based on the spin button, nButton is the event parameter of the click event, and value is an integer of the progress bar.
The ole_gauge properties are accessed via PowerScript by pre-fixing the properties with the object keyword.
OCX methods, like those of functions, can be called by using dot notation. For example to display the About box for the ole_gauge control, you would code the following script:
|