Canvas > Using Canvas > Canvas User Interface > Workspace > Layers Pane

Layers Pane

On the Canvas toolbar, click Layers (Display layers) to display a Layers pane in your application window or to hide the currently open pane.

A Canvas screen can be comprised of one or more layers. You can create and edit specific content on your screen, assign content (controls and objects) to different layers, and change properties and visibility of a layer without affecting other layers on the screen. Layers are helpful for organizing objects on a screen into logical divisions. For example, a layer called "Wells" can be created on which well-related objects are placed. On top of that, you could create a layer called "Controls," which might contain other controller-related objects. Layers provide an easy way to select, show, hide, and change properties and attributes of objects contained on a layer.

The Layers pane lists all configured layers for the screen that is currently open in the Screen pane and is used to manage the visibility of the layers on a screen in Design mode and Run mode. Any layer can be hidden by clicking Layer is visible (Hide layer) in the Layer pane. This means that none of the objects on that layer are visible in Design mode or Run mode.

Layers Pane Features

The following table describes the Layers pane interface.

Column Description

Refresh

Click Refresh to load the Layers pane, or click Refresh periodically to reload the pane as you work.

Layer is visible

An icon indicates whether this layer is visible in Design mode and Run mode. Click the icon to hide or show the layer.

<Name of layer>

The name of the layer.

The layer is assigned in the Layer property on each control or object.

<None> shows all objects not assigned to any layer.

Assigning Objects to Layers

All controls (except the Screen and the Object) have a Layer property where you can add the control to a layer.

The Layer property specifies the layer for this control. Layers are used to show, hide, and edit multiple controls on one layer without affecting controls on another layer.

Tip: You can also edit a control's Layer on the Controls view of the Screen pane.

 

Note: Layer visibility can be controlled at runtime via the AddLayer, HideLayer, and ShowLayer methods on the Screen object.

Create a new layer by typing a unique layer name.

Choosing How to View the Layers Pane

In the pane title bar, you can select how to display the pane by default (whether to float, dock, auto-hide, or hide it), pin the pane in place, or close the pane. Unpinning (or hiding) a pane when not in use gains extra space for viewing your current screen or another open pane. Closing a pane can also occur from the pane title bar. The following icons are available:

See Customizing the Workspace for more information.

Scripting Layers

Adding a control to a layer via script will not automatically update its visibility to match that of the layer. Instead the control will maintain its existing visibility until the layer visibility is modified. This when scripting layers the following order of operation is required:

  1. Add controls to the layer.
  2. Modify the visibility of the layer.

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.