PTypeStyle

Switches the specified type-style on or off. 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 constructor

PTypeStyle(short cStyle);
kStyleNormal to remove all other styles
kStyleBold to apply or remove the bold style
kStyleItalic to apply or remove the italic style
kStyleUnderline to apply or remove the underline style
kStyleOutline to apply or remove the outline style (Macintosh only)
kStyleShadow to apply or remove the shadow style (Macintosh only)
kStyleStrikethru to apply or remove the strikethru style
kStyleReverse to reverse the type to or from the color of the paper
Command acts as toggle. The PTypeStyle command acts as a toggle or switch. If bold is already specified and you specify bold again, the style will change to "not bold." Specifying kStyleNormal, however, always sets the normal style.

Change text color with PColor command. You can change the color of text (including reversed type, which is the color of the paper and white by default) with the PColor command.

Example. The following example selects a text block, positions the insertion point at the beginning of the text block, and selects to the end of the paragraph, changing the current style to bold and italic.

PSelect(1);
PTextEdit();
PTextSelect(kTextAmtParaFor);
PTypeStyle(kStyleNormal);
// reset to plain style
PTypeStyle(kStyleBold);
PTypeStyle(kStyleItalic);


See also

The PColor, PTextEdit, PTextSelect commands

The PGetTypeStyle query

Adobe PageMaker 6.5 Help > Commands > Type > Type Styles


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

Comments or suggestions? Contact Adobe Developer Support