PGetTrack

Gets the Track setting applied to the selected text.


Query results

This query returns a short value, representing:
kTrackNoTrack (these constants are defined in PKeywords.h)
kTrackVeryLoose
kTrackLoose
kTrackNormalTrack
kTrackTight
kTrackVeryTight
-2
for multiple settings in selection
Defining or editing a style. If you are defining or editing a style using the PStyleBegin command, PageMaker gets the tracking attributes for that style rather than for the selected text.

Multiple settings. If multiple characters are selected and they have different tracking attributes, PageMaker returns -2.

No insertion point. If the text does not contain the insertion point, PageMaker gets the default track settings.

No text selected. If the text contains the insertion point but no text is selected, PageMaker returns the track settings of the character preceding the insertion point. If the insertion point is before the first character of the story, PageMaker returns the track settings of the first character.

Example. Check the current track setting, then changeit using the PTrack command.

PGetTrack currTrack;
if ((currTrack > kTrackNoTrack) && (currTrack < kTrackVeryTight))
    PTrack(currTrack + 1); // tighten a tad 


See also

The PGetWordSpace and PGetLetterSpace queries


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

Comments or suggestions? Contact Adobe Developer Support