Important: The information in this document is obsolete and should not be used for new development.
TEReplaceStyle
TheTEReplaceStyle
procedure replaces any character attributes in the current selection range that match the specified existing character attributes with the specified new character attributes.
PROCEDURE TEReplaceStyle (mode: INTEGER; oldStyle,newStyle: TextStyle; redraw: BOOLEAN; hTE: TEHandle);
mode
- A selector that specifies which attributes to replace. It corresponds to any additive combination of the
mode
constants for font, character style, type size, color, and so forth.oldStyle
- A pointer to a text style record that specifies the current character attributes to search for in the selected text.
newStyle
- A pointer to a text style record that specifies the new attributes to be set. This record contains the character attributes to be applied to the current selection range based on the value of
mode
.redraw
- A flag that specifies whether or not TextEdit should immediately redraw the text to reflect the attribute changes. A value of
FALSE
delays redrawing until another event forces the update. A value ofTRUE
causes the text to be redrawn immediately using the new character attributes.hTE
- A handle to the multistyled edit record containing the text selection whose character attributes are to be changed.
DESCRIPTION
TheTEReplaceStyle
procedure replaces any attribute in the current selection range that matches the attribute specified byoldStyle
with that given bynewStyle
. Only the character attributes specified bymode
are affected.Attribute changes are made directly to the style elements (
STElement
) within the style table itself (TEStyleTable
). If you specify the valuedoAll
for themode
parameter,newStyle
replacesoldStyle
outright. Possible values for themode
parameter are defined by the following constants. TheTEReplaceStyle
procedure has no effect on a monostyled edit record.