Variable Pane is a generic
display element that displays
at runtime any of several display elements. Its typical usage is to
change part of the display on screen according to the type of data the
application needs to display.
similar to Dynamic
Display, but Variable Pane can switch only between a set of
display elements explicitly specified in its model, while Dynamic
bet set at runtime to any display element.
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:
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
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
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.
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:
For best results, use the Firefox browser..