PTabs

Specifies the number of tab stops and sets the kind, the offset from the left side of the text block, and a leader characters (if any) for each. The extent of the action depends on which tool is active, whether any text is selected, and whether a publication is open when the command is executed.


Command constructors

This class has two constructors.

PTabs();

The default constructor clears all user-defined tabs, and resets to the default setting of one tab every 0.5 inch or 3 picas (10mm in international versions).
PTabs(PRequestBuf& tabs);
Since you can specify a varying number of tab stops, this constructor takes a PRequestBuf object that contains a count field (short), followed by that many fields containing:

short cKind;

kAlignmentLeft (these constants are defined in PKeyword.h)
kAlignmentCenter
kAlignmentRight
kAlignmentDecimal
long xPosition;
Offset from left side of text block in twips
const char * sLeader;
Leader characters (maximum of 2 characters; any single character is automatically doubled)

Specify an empty string ("") for no leader characters

Define tabs left to right. Specify the tab positions from left to right across the page. If the tab positions are out of order, PageMaker returns an error.

Predefined tabs. The Indents/Tabs ruler has default tab settings every 0.5 inches or 3 picas (marked by small trianglessee dialog box). The tab positions you specify replace any predefined settings between the left margin and those positions.

In international versions of PageMaker, the metric system is the default measurement system, and the default tab settings are every 10mm.

User-defined tabs cleared. The PTabs command removes any existing tabs before applying the new ones. To clear all user-defined tabs and return the ruler to the default setting of one tab every 0.5 inches or 3 picas (10mm in international versions), use the default constructor:

PTabs();

Story editor or no insertion point. If you use the PTabs command when story editor is active, if there is no insertion point in a story, or if a tool other than the text tool is active, then PageMaker sets the default tab locations for the publication.

Example. The following example creates three tabs: the first, a center tab offset 0.25 inches from the text block; the second, a left tab offset 0.5 inches from the text block; and the third, a decimal tab with leader dots, offset 4 inches from the text block.

PRequestBuf tabs(100); // 100 bytes, plenty big
tabs << (short) 3; // three tabs
tabs << (short) kAlignmentCenter << (long) twips(".25i") << "";
tabs << (short) kAlignmentLeft << (long) twips(".5i") << "";
tabs << (short) kAlignmentDecimal << (long) twips("4i"); << "..";
PTabs(tabs);


See also

The PGetTabs query

Adobe PageMaker 6.5 Help > Commands > Type > Indents/Tabs


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support