Skip to main content
Version: 9.0.2

sb.setLayerAttrs

sb.setLayerAttrs(layerName, tagObject)

Set properties for a layer instance associated with a particular screen. The layerName specifies either the fully qualified name of a layer instance using the ScreenName.LayerName naming convention or, if only the layer name is specified, the name will refer to a layer instance associated with the current screen

x, y, width, height, alpha, hidden, xoffset, yoffset, scroll_enabled, geometry

The scroll enablement value can only be set if the layer had scrolling enabled in Designer.

Parameters

ParameterTypeDescription
layerName stringThe model full path of the layer to change properties on
tagObject objectAn object with tags as the keys and the new values stored as the object's key values

Example

function setLayerHidden() {
local data= {hidden: 1}
sb.setLayerAttrs("my_layer", data);
}