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. When scripting layers the following order of operation is required:
- Add controls to the layer.
- Modify the visibility of the layer.
Note: Layer visibility can be controlled at runtime via the AddLayer, HideLayer, SetLayerVisibility, and ShowLayer methods on the Screen object.
| Methods | Description |
|---|---|
|
AddLayer |
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. |
|
HideLayer |
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. |
|
SetLayerVisibility |
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. |
|
ShowLayer |
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. |
Also see Layers Pane for more information about using the Layers pane in design mode.
