Variable Pane is a generic display element that displays at runtime any of several display elements. Its typical usage is to dynamically change part of the display on screen according to the type of data the application needs to display.
Variable Pane is similar to Dynamic Display, but Variable Pane can switch only between a set of specific display elements explicitly specified in its model, while Dynamic Display can bet set at runtime to any display element.
Usage
You can place inside the Variable Pane any number of display elements, one for each possible display (let's call these "display options"). At runtime, only one of the display options will be displayed at any given time.
The decision which of the display options is displayed at runtime is made by setting values to sub-elements within one of the display options – the display option within which a value is last set will be the one to be displayed:
Example 1: If the Variable Pane contains 3 display options A, B and C, and a value is set to an element within B, then B is displayed.
Example 2: If a value is set to an element within B, and then a value is set to an element within A, then A is displayed.
Be Careful: If a value is set to an element within B, and then the value 'No' is set to the <Visible> element of A, still A is displayed. If you want B to be displayed instead of the previously displayed A, it is enough to set a value to any element (or elements) within B – don't try to explicitly "hide" A.
Usage Example
The ‘Tree4Notes’ project contains an example of using Variable Pane to display either a text note or an image.
Accordingly, the model contains a Variable Pane element called Content Variable Pane that is set at runtime to display either its Text element or its Image element:
To decide whether the Text element or the Image element is displayed, we use a process that sets value to either an element of Text or an element of Image:
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign