PGetCase

Gets the Case setting (Normal, All Caps, or Small Caps) assigned to the selected text.


Query results

This query returns a single short value, which represents the Case setting:
kCaseNormal (0) for Normal
kCaseAllcaps (1) for All Caps
kCaseSmallcaps (2) for Small Caps
-2 for multiple settings in selected text
Defining or editing a style. If you are defining or editing a style using the PStyleBegin command, PageMaker gets the case for that style rather than for the selected text.

Multiple settings. If PageMaker finds more than one case setting in the selected text, PageMaker returns -2.

No insertion point. If the text does not contain the insertion point, PageMaker gets the default case setting.

No text selected. If the text contains the insertion point but no text is selected, PageMaker returns the case setting of the character preceding the in sertion point. If the insertion point is before the first character of the story, PageMaker returns the case setting of the first character.

Example. To change the case settings, use the PCase command class.

PGetCase currCase;
if (currCase == case_normal) PCase(case_allcaps);


See also

The PGetTypeOptions query



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

Comments or suggestions? Contact Adobe Developer Support