You use the Events tab to assign commands to your graphics pages. These commands can be executed when the page is opened, closed, or whenever the page is open. You can also define different messages to log at the same time.
Page events have the following properties:
There are three events to which commands can be attached. You can select more than one type of event. Unique commands can be attached to each (i.e., you can perform one task when the page is opened, and another when it is closed).
[Event] On page entry
Select this option if you want a command to be executed when the page is initializing. For example, you could execute a command to extract recipe data from a database into a Cicode variable, to be displayed on the page.
Note: Use the "On Page Shown" event if your command uses ActiveX controls. The "On page entry" event may not properly initialize ActiveX controls. The resulting value from a tag write that is perfomed using the "On page entry" event may not be displayed and accessed correctly if the tag is used directly within the page. The "On page shown" event can be used for initializing tags that are to be accessed on the page.
[Event] On page exit
Select this option if you want a command to be executed when the operator exits the page. For example, this command could be used to close a database that was opened at page entry.
Do not call the following functions:
Note: If you shut down the system, "On page
exit" functions for the currently open pages do not execute. If a
particular page exit code needs to run, call the code before
[Event] While page is shown
Select this option if you want a command to execute continually for the entire time that the page is open. For example, the While page is shown command could be used to perform background calculations for this page.
[Event] On page shown
Select this option if you want a command to execute when a page is first displayed and objects on it (including ActiveX controls) have been initialized. If you want to reference ActiveX controls in your command then use this event instead of "On page entry".
1. Use the "On Page Shown" event if your command uses ActiveX controls. The "On page entry" event may occur before the ActiveX controls have been initialized.
2. Use the "On Page Shown" event if your command requires access to the latest variable tag value. The "On page entry" event may occur before the tag has been resolved.
See also PageInfo Cicode function, type 25.
The commands (set of instructions) to be executed immediately when the selected Event occurs.
To insert a tag or a function, click the Wizard button to the right of this field. This button displays two options; Insert Tag, and Insert Function.
Click Apply, and then click OK. Click Clear Property to clear property details, and disable the property. To define further properties for the page, click the relevant tabs.