PGetTextLocation

Gets the object ID of the text block containing the highlighted text, as well as the coordinates that define the boundaries of the highlighting.



Query results

unsigned long nObjectID;
Object ID of text block containing highlighted text
long xAnchorBottom;
x coordinate of AnchorBottom in twips (see illustration above)
long yAnchorBottom;
y coordinate of AnchorBottom in twips (see illustration above)
long xAnchorTop;
x coordinate of AnchorTop in twips (see illustration above)
long yAnchorTop;
y coordinate of AnchorTop in twips (see illustration above)
long xRightTop;
x coordinate of right top edge of selection in twips
long yRightTop;
y coordinate of right top edge of selection in twips
long xRightBottom;
x coordinate of right bottom edge of selection in twips
long yRightBottom;
y coordinate of right bottom edge of selection in twips
long xRangeEndTop;
x coordinate of RangeEndTop in twips (see illustration above)
long yRangeEndTop;
y coordinate of RangeEndTop in twips (see illustration above)
long xRangeEndBottom;
x coordinate of RangeEndBottom in twips (see illustra tion above)
long yRangeEndBottom;
y coordinate of RangeEndBottom in twips (see illustra tion above)
long xLeftBottom;
x coordinate of left bottom edge of selection in twips
long yLeftBottom;
y coordinate of left bottom edge of selection in twips
long xLeftTop;
x coordinate of left top edge of selection in twips
long yLeftTop;
y coordinate of left top edge of selection in twips
Double-clicked ranges. Regardless of the initial position of the insertion point, when you select a word by double-clicking, the anchor point is before the first character of the word. The ending point is after the trailing space or, if the word is not followed by a space, the range ends after the last character of the word.

Triple-clicked ranges. When you select a paragraph by triple-clicking, the anchor point is before the beginning of the first line of the paragraph (before any indents) and the range ends at the beginning of the line below the paragraph.

Location of insertion point. You can use PGetTextLocation to get the location of the insertion point when no text is selected. However, the story must contain at least one character. PageMaker does not recognize an empty story.

Exceptions. PGetTextLocation throws a CQ_INVALID_STATE exception when either:


See also

The PGetTextCursor, PGetSelectIDList, and PGetObjectIDList queries

The PTextSelect, PTextCursor, PSetTextCursor, and PSelectID commands


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

Comments or suggestions? Contact Adobe Developer Support