direction

Defines the direction of plain and rich text in items. This is typically used when working with bidirectional languages, such as Arabic and Hebrew.

Syntax

Sets direction for text in the Label option of Check and Radio items, and text in value options for other items. This affects both plain and rich text.

This option only works on text. To affect other features of the item, such as border, itemlocation, and so on, use the orientation option.

   <direction>status</direction>
Table 1. direction parameters
Parameter Type Description
status ltr Toggle ltr (Left-To-Right) to change the direction of text.
  rtl Toggle rtl (Right-To-Left) to change the direction of text.

Available in

button, check, combobox, field, label, list, popup, radio, richtext

Example

The following is an example of an Arabic form (xml:lang="ar-SA") using the direction option to enable left-to-right text entry in a field item that is within an otherwise right-to-left oriented form. The label of the field is displayed right-to-left, but the text value of the e-mail address is entered and displayed left-to-right.

<XFDL xmlns="http://www.ibm.com/xmlns/prod/XFDL/8.0" 
   xml:lang="ar-SA" 
   >
...

<field sid="EmailAddr">
   <label>Email address:</label>
   <direction>ltr</direction>
   <value>jpublic@example.org</value>
</field>

Usage details

  1. Default: Per parent's orientation. If not set, the direction is defaulted to ltr (Left-To-Right).
  2. If a bidirectional language is specified, and the orientation option is set, text style such as color, bold, and so on are ignored.