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:
Field |
Description |
---|---|
Event |
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. The following functions should not be called: 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. The following functions should not be called: Note: If you shut down the system, "On page exit" functions for the currently open pages will not execute. If a particular page exit code needs to run, call the code before calling the |
[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". Notes:
See Also |
Event On activate |
Select this option if you want the command to execute when the window is activated at runtime. The automation interface allows you to set or get commands for this event using PageEventPutEx and PageEventGetEx. |
Event On deactivate |
Select this option if you want the command to execute when the window is deactivated. This command will close the window. The automation interface allows you to set or get commands for this event using PageEventPutExand PageEventGetEx. |
Command |
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.
See Also
Published June 2018