International Language Environments Guide

Horizontal Tabs

To control the placement of text, a compound string can contain tab characters. To interpret those characters on display, a widget refers to the rendition in effect for that compound string, where it finds a list of tab stops. However, the dynamic widgets (TextField and XmText) do not use the tab resource of the rendition. Instead, they compute the tab width using the formula of 8*(width of character 0).

The tab measurement is the distance from the left margin of the compound string display, or from the right margin, if the layout direction is right-to-left. It is important to note that, regardless of the direction of the text (Arabic right-to-left or English left-to-right), the tab inserts space to the right or left as specified by the layout direction (XmNlayoutDirection).

The text following a tab is always aligned at the tab stop, and the tab stop is calculated from the start of the widget, which in turn is influenced by XmNlayoutDirection. The behavior of the tabs and their interaction with directionality of the text and the XmNlayoutDirection of the widget is illustrated in the following figure.

The input for this illustration is abc\tdef\tgh.

Figure 7-2 Tabbing Behavior

Graphic