FANDOM


Specifies whether the field should lay out its contents in a left-to-right or right-to-left manner.Syntax:

set the textDirection of field to {ltr | rtl | auto}

Examples:

set the textDirection of field "name input" to "rtl"

Use the textDirection property of a field to specify how the contents of a field should be laid out.

The textDirection property of a field species how the contents of a field should be laid out.

The "ltr" direction specifies that the contents of the field are to be laid out in a left-to-right manner. Tabs and lines start at the left-hand side. Runs of RTL text will still be arranged correctly but will be aligned to the left.

The "rtl" direction specifies that the contents of the field are to be laid out in a right-to-left manner. Tabs and lines start at the right-hand side. Runs of LTR text will still be arranged correctly but will be aligned to the right.

Setting the textDirection property to auto indicates that the engine should auto-detect LTR or RTL behaviour based on the contents of the field. To do this, it looks for the first strongly-directional character in the field (e.g a Latin letter or an Arabic letter).

Parameters:

  • direction (enum): The direction to be used to lay out the contents of a field
  • - "ltr": Left-to-right - "rtl": Right-to-left- "auto": Auto-detect based on the contents of the field.
  • Description:Use the textDirection property of a field to specify how the contents ofa field should be laid out.
Community content is available under CC-BY-SA unless otherwise noted.