INPUT /  OUTPUT /  LANGUAGE






selectable field

Enables or disables the user's ability to select and copy text within a presentation tag, by dragging the mouse across the screen between the start and end of the text they may wish to select, or double-clicking words.

Behaviour

By default, text within presentation tags is selectable by the user. Setting the selectable field to false disables this ability.

For accessibility reasons, it is recommended to leave text selectable where possible. The user may have special needs or requirements. In general, if your program is sending output to the user's console, it is only polite that the user should be able to select it and/or make a personal record of it.

However, in some cases, the user interface may be inappropriate for text selection, and the user may end up accidentally selecting text on the screen while trying to interact with the console in other ways. An example might be a video game where the player is expected to drag the mouse across the screen or click rapidly as part of basic gameplay, and any resulting text selection would be unwanted. In such cases, it's appropriate to set the selectable field to false in the presentation container tag that contains all the other gameplay elements.

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 selectable=null). Otherwise the presentation tag will be created without a selectable field and you will not be able to directly alter the user's ability to select text afterwards.

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.