Object (Screen) Events
The Object supports the following scripting events. Click next to any event name in the Events pane to see a short description for the selected event.
See Accessing Screen Objects for more information about how to view control objects in script in the Canvas application.
Note: In script, the Object container is always referred to as Screen.
| Event | Description |
|---|---|
|
The Broadcast Message Received event is called when a broadcast message from another screen is received. See Broadcast a Message Via Script for more information about using this event. ExampleCanvas.Shared.BroadcastMessageEventArgs See Event Argument Type for more information about EventArgs. |
|
|
Close |
The Close event is called when the screen is closed. |
|
The Controls Initialized event is called after the Initialize event has been fired on the screen and all other controls within. |
|
|
The Custom Context Menu Action event is called when the custom context menu item is clicked. A Script event ID (configured for each custom context menu item in the Context Menu Items property for the screen or control) is passed in along with other relevant information in the context of the click, for example, facility or point tag, as appropriate. ExampleThe following example shows how to use the Custom Context Menu Action event for the CygNet Grid. Substitute Grid1 with your control. Canvas.Controls.Grid.CustomContextMenuActionEventArgs When you click on a custom context menu item from a control, Canvas will execute the following function:
CustomContextMenuActionEventArgs.EventActionID indicates the Script event ID defined in the Custom Context Menu Configuration dialog box. Copy
Custom Context Menu Action event
See Event Argument Type for more information about EventArgs. |
|
|
The Facility Changed event is called when the screen's facility is changed. ExampleSee Event Argument Type for more information about EventArgs. |
|
|
Initialize |
The Initialize event is called when the screen is created in preview or run mode to allow further initialization of the control. |
|
The Navigate By Facility event is called when the screen receives a request to navigate by a specific facility tag. See Navigation by Facility for more information about using this event. ExampleCopy
Navigate By Facility event
See Event Argument Type for more information about EventArgs. |
|
|
The Nested View Message Received event is called when a Nested View sends a message to its parent screen. See To communicate between screens in a Nested View via script for more information about using this event. ExampleCopy
Nested View Message Received event
See Event Argument Type for more information about EventArgs. |
|
|
The Opened Via Hyperlink event is called when a screen is opened via a hyperlink. The screen issuing the hyperlink must also provide a value for a data parameter; without this custom data, the event will not fire. ExampleRelated Links
|
See Order of Event Execution for information about the order in which events are executed on a screen.
