wp.setTab

Syntax wp.setTab (position, type, leader)

Params position is a number indicating the number of pixels from the zero point of the ruler where you want to set a tab.

type is a number indicating the type of tab stop to set. Its legal values and their interpretation are explained under "Action," below.

leader is a character to be used as the fill character for the empty space to the left of the tab stop.

Action Sets a tab of the indicated type, located position pixels from the zero point on the ruler for the selection in the target window. When the user presses the Tab key with this setting in effect, the space between the start point and the tab stop are filled

with leader characters. If the selection is empty, this verb applies to the paragraph in which the cursor appears.

The type of tab is one of the following:

1 = left tab

2 = centered tab

3 = right tab

4 = decimal tab

Returns True

Examples edit (@examples.testText2);
wp.setSelect (0, 0); « position cursor in upper left corner of document
wp.setTab (72, 1, '.')

   » true

A left tab stop is now set at the 1-inch mark with periods as leader characters. Make the word processing document active, and press the Tab key from the left margin in this paragraph. Notice the result.

Notes A maximum of 18 tabs can be set in any given paragraph.

See Also wp.clearTabs

Discuss