PGetAlignment

Gets the Alignment setting that is assigned to the selected text or to the paragraph containing the insertion point.


Query results

The query returns a single short value indicating the current alignment:
kAlignmentLeft for Align Left (these constants are defined in PKeywords.h)
kAlignmentCenter for Align Center
kAlignmentRight for Align Right
kAlignmentJustify for Justify
kAlignmentForce for Force Justify
-2 for multiple alignment types in selection
Defining or editing a style. If you are defining or editing a style using the PStyleBegin command, PageMaker gets the alignment setting for that style rather than for the selected text.

Multiple alignment types. If you select more than one paragraph and they have different alignments assigned to them, PageMaker returns -2.

Pointer tool is active. If the pointer tool is active, PageMaker gets the default alignment setting.

Example. If alignment is Force Justify, change to Justify with the PAlignment command.

PGetAlignment alignment;
if (alignment == kAlignmentForce) PAlignment(kAlignmentJustify);


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

Comments or suggestions? Contact Adobe Developer Support