Using the visible property in Hx profile (an example)

An example of binding and using the visible property is shown in the following illustration.
Image

The example shows the visible property animated using a value binding. The value binding is linked to a writable point that passes its true or false value to the visible property so that it is visible (true) or hidden (false).

Note the following visibility characteristics:

  • The visible property functions in Hx exactly as it functions in Px.
  • Direct children of Tabbed panes cannot have a hidden visibility (visible = false).
  • Direct children of Scroll panes cannot have a hidden visibility (visible = false).
  • The visible property updates every 5 seconds.

The following illustration gives a comparison of how a simple use of the visible property displays in a browser using the WbApplet and using Hx (no applet).

Image

Note the following about this example:

  • The ARM and SAFE buttons write to a Boolean point.
  • The ARMED and SAFE labels have a visible property that is bound to and animated by the value of the Boolean point.
  • Clicking the ARMED button sets the Boolean point value to true.
  • Clicking the SAFE button sets the Boolean point value to false.
  • The true Boolean point value sets the ARMED label visible property to true and the SAFE label visible property to false as defined by their respective visible properties using the visible window.
  • The false Boolean point value sets the ARMED label visible property to false and the SAFE label visible property to true as defined by their respective visible properties using the visible window.
  • The behavior of the visible property is the same in both Px (WbApplet) and Hx rendered views in the browser.
    Image