Screen Methods
The Screen supports the following scripting methods.
See Accessing Screen Objects for more information about how to view control objects in script in the Canvas application.
| Methods | Description |
|---|---|
|
The AddControl method dynamically adds a control to a screen object at runtime. See Adding a Control Via Script for more information about using this method. |
|
|
The AddLayer method dynamically adds a layer to a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
|
|
The CloseScreen method closes a screen. |
|
|
Equals |
The Equals method determines whether the specified object is equal to the current object. |
|
The GetAllScreenControls method retrieves all objects on a screen allowing programmatic interaction with all controls on a screen. |
|
|
|
|
|
The GetGlobalDictionary method returns the dictionary itself, allowing a script writer to manipulate the dictionary directly or inspect its contents. ExampleThe Canvas.Shared class, "CanvasGlobalDictionary," is a See Global Dictionary for more information about using this method. |
|
|
GetHashCode |
The GetHashCode method returns a hash code for the current object. |
|
GetType |
The GetType method returns the runtime type of the current instance. |
|
The HideLayer method dynamically hides a layer on a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
|
|
Hyperlinking is accomplished via script using the Hyperlink method on the sending (hyperlinking) screen and the OpenedViaHyperlink event on the receiving (hyperlinked) screen. Hyperlinking is supported between screens, objects, and Nested Views in Canvas, Canvas.View, and Canvas.View.Lite. The Hyperlink method supports several modes:
Optionally, you can pass a siteService, facility ID, or a data object to a hyperlinked screen. See Hyperlinking Screens for more information about using this method. |
|
|
The IsOrderInTypeConfiguredForDefinition method checks to see if an order in type (facility ordinal) is configured for the selected relative facility definition. |
|
|
The IsScreenOpen method checks to see if a screen is open in that instance of Canvas or Canvas.View. This method is case-insensitive. |
|
|
|
|
|
The NavigateToScreenByFacility method is included on the screen object and allows you to navigate to a specific screen by selecting a CygNet facility. ExampleThe script call is as follows: The correlation between a facility and its associated screen is done via a facility attribute. You will need to configure the facility attribute that references the associated screen in your CygNet system for each facility using CygNet Explorer. See Navigation by Facility for more information about using this method. |
|
|
The ReadFromGlobalDictionary method reads a complex script object from another screen. See Global Dictionary for more information about using this method. |
|
|
The RemoveControl method dynamically removes a control to a screen object at runtime. See Adding a Control Via Script for more information about using this method. |
|
|
The ResetMouseCursor method resets the mouse cursor setting for the screen. |
|
|
The ResolveRelativeFacility method returns the resolved relative facility. |
|
|
The SendFacilityBroadcast method broadcasts a facility to any open screen set to receive the facility. See Broadcast a Message Via Script for more information about using this method. |
|
|
The SendMessageBroadcast method broadcasts a message to any open screen set to receive the broadcast. See Broadcast a Message Via Script for more information about using this method. |
|
|
The SendParentMessage method sends a message from a child screen to a parent screen. See Broadcast a Message Via Script for more information about using this method. |
|
|
The SendSiteServiceBroadcast method broadcasts a SiteService to any open screen set to receive the SiteService. See Broadcast a Message Via Script for more information about using this method. |
|
|
The SetLayerVisibility method dynamically shows or hides a layer on a screen object at runtime. ExampleThe script call is as follows: Copy
SetLayerVisibility method
where "Layer 1" is the layer name. See Scripting Layers for more information about using this method. |
|
|
The SetMouseCursor method sets the mouse cursor setting for the screen. |
|
|
The ShowLayer method dynamically shows a layer on a screen object at runtime. ExampleThe script call is as follows: where "Layer 1" is the layer name. |
|
|
The ShowPopup method creates a popup at the mouse location containing an object specified in the parameters. The path can be either a Canvas screen file (.can) or Canvas object file (.cob). ExampleThe script call is as follows: Copy
ShowPopup method
|
|
|
ToString |
The ToString method returns a string that represents the current object. |
|
The WriteToGlobalDictionary method saves a complex script object to a global dictionary in the Canvas application’s memory. See Global Dictionary for more information about using this method. |

