INPUT /  OUTPUT /  LANGUAGE






visible field

Category: scalar field

Specifies whether an object should currently be rendered to the screen, or hidden from the user. If this field is not specified, the object will be visible by default.

Applies to...

box, button, checkBox, choiceBox, clientFrame, ellipse, img, input, line, span, table, tabRow, video

Behaviour

This field takes a single boolean value:

ValueDescription
true the field property is enabled for this tag
false the field property is disabled for this tag
null the field is left unspecified. Default behaviour applies.

All presentation tags are visible by default. Setting the visisble field to false allows it to be hidden, meaning it will not be rendered in the console, will not take up space on the screen, and will be removed from the display if it was already visible. Setting the field to true allows a previously hidden tag to be displayed on the screen.

To make use of this field within a tag, it must be defined with an initial value when the tag is created (even if it is initially set as visible=null). Otherwise the presentation tag will be created without a visible field and you will not be able to directly alter that tag's visibility afterwards.

Note: Many tags will progressively update their display as content is pushed into them. For content-heavy elements such as tables, this can lead to slow rendering as the entire table is re-rendered several times before it is complete.
The visible field can be used to improve performance in such cases, by ensuring a content-heavy tag is not rendered on the screen until all its content is in place. This can be done by setting visible=false in the tag before content is added and then changing the visible field to true after all its content has been added.