AX2123
Using multiple layers on the canvas
Each Axiom form canvas can have multiple layers. Layers can be used for two purposes:
- Within the Form Designer, layers can be used to assist in design, to show or hide groups of components that you want to work with.
- When the form is rendered, layers can be used to dynamically show and hide groups of components to the user.
Layers are one of the ways that you can design a single form that has multiple "pages" or "views". Each layer in the form can represent a different view that you want to dynamically show or hide. Axiom form viewers can then switch among the different layers by using an interactive component such as a combo box or radio buttons. Different layers can then become visible or hidden based on the user's selection. (Alternatively, Panel components can also be used to achieve this type of design.)
Conceptually this is similar to a tabbed interface, where users can click tabs to see different content, except that Axiom form designers can choose the means by which users change views, and can control what part of the form is affected by the change.
You can also use layers as a Form Designer tool only, to make it easier to show and hide certain groups of components. If your form has many components, this can make it easier to find and work with just the components you want.
NOTE: Using layers is the only way to hide components in the Form Designer. All components display in the Form Designer regardless of whether the Visible property for the component is enabled or disabled. This is done so that you can work with dynamically visible components on the canvas without having to clear or change the formulas that make them work.
Layers have two properties that control their visibility:
-
Is Visible In Designer: This property determines whether the layer is visible in the Form Designer. This property has no effect on whether the layer is visible or not in the rendered form. You can toggle layers visible or not by using the check boxes in the Layer section of the Form Designer.
-
Visible: This property determines whether the layer is visible in the rendered form. This is the property that you would set up to dynamically change based on some other component in the form, so that form users can switch between viewing different layers.
By default, each Axiom form canvas has one layer named Layer1. If your form will only have one layer, then you can ignore this feature and leave the layer at its default settings. If you plan to use multiple layers, then it is a good idea to rename the default layer to something more descriptive.
Working with layers in the Form Designer
You can work with layers in the bottom right corner of the Form Designer. This area lists all layers defined for the Axiom form.
You can manage layers as follows:
-
Adding a layer: To add a layer, click the Add layer icon
. This adds a new layer to the list, named something like Layer2 (assuming you are adding a second layer). You should rename this layer to something more descriptive.
-
Renaming a layer: To rename a layer, click the Rename layer icon
(you can also right-click the layer). In the Rename Layer dialog, type the new layer name and then click OK.
-
Change layer order: To move a layer up or down in the layer order, select the layer that you want to move and then click the Move layer up arrow or the Move layer down arrow. The layer at the top of the list is the top-most layer.
The layer order is represented on the Form Control Sheet using the Z-index setting for each layer.
-
Deleting a layer: To delete a layer, select the layer in the list and then click the Delete layer icon
(you can also right-click the layer). You are prompted to confirm that you want to delete the layer. All components in the layer will also be deleted, so if you want to save any of the components you should first move them to a different layer.
-
Select all components: To select all components in a layer, click the Select all in layer icon
(you can also right-click the layer). All components that are assigned to that component become selected on the canvas.
-
Hiding or showing a layer: To show a layer in the Form Designer, select the check box for that layer. To hide the layer, clear the check box. You can also hide and show layers using the Layer link at the top of the Form Assistant.
This setting only affects whether layers display in the Form Designer and the Form Assistant for editing purposes; it does not affect whether the layer shows in the rendered Axiom form. The Visible property for the layer determines whether it is visible in the rendered form.
Assigning components to layers
When you drag a component onto the canvas, it must be assigned to a layer in the component properties.
When a new component is dragged and dropped onto the canvas, by default the component is assigned to whichever layer is currently active—meaning, whichever layer is currently selected in the Layers list. If there is only one layer, then that layer is selected by default.
NOTES:
- If you drag and drop a new component onto a Panel component, that component will be assigned to the same layer as the parent panel, regardless of the currently active layer for the canvas. This will cause the component's layer to become the active layer.
- If you duplicate a component, then the new component will inherit whichever layer was assigned to the original component.
Each component can only belong to one layer, although you can change the component's layer dynamically by setting up a formula on the Layer property for the component in the Form Control Sheet. However, if you find yourself wanting to assign a component to multiple layers, then you may want to reevaluate your Axiom form design. For example, you may need a "base" layer that is always visible, or you may need to change the visibility of some components at the component level instead of at the layer level.
Using the Form Designer, you can move components to a different layer as follows:
-
To move an existing component to another layer: Select the component in the canvas, then click Arrange > Move to layer, then select the desired layer. This command is also available by right-clicking a component. The component will be assigned to the selected layer, in the same location on the canvas.
-
To duplicate an existing component to another layer: Select the component on the canvas. Press the SHIFT key, then click Duplicate. This will create a copy of the existing component, at the same location on the canvas. You can then assign this duplicate component to a new layer (by editing the component properties, or by using Arrange > Move to layer).
Configuring layer visibility in the Axiom form
The Layer check boxes in the editor only determine whether a particular layer is visible in the editor, so that you can work with different layers as needed. To determine whether a layer is visible in a rendered Axiom form, you must use the layer's Visible property.
By default, all layers are visible. If you want users to be able to dynamically show and hide different layers, then you should configure the layer settings so that certain layers are visible or not based on an interactive component, such as a combo box or radio buttons.
For example, imagine you have an Axiom form with two different "views" (layers): a Summary view and a Detail view. You want the Axiom form users to be able to choose which view they want to look at. You can set up a combo box where the users can select either Summary or Detail. Then you can configure the Visible property for each layer to point to the combo box selection, and either hide or show the layer depending on what is selected.
The Visible property for a layer can be edited on the Form Control Sheet. Layer settings are listed in the Components section of the control sheet, by layer name. You can also go directly to a layer's properties by clicking the Show layer definition button next to the Layer setting for any component.
If more than one layer is visible within an Axiom form, the components of those layers will display in layer order first, then within each layer by component order (rendering order). The layer at the top of the Layer list is the top-most layer. This means that the components of one layer can cover some or all of the components of another layer if both layers are visible at the same time and the components overlap.