Important: The information in this document is obsolete and should not be used for new development.
TEReplaceStyle
TheTEReplaceStyleprocedure 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
modeconstants 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
FALSEdelays redrawing until another event forces the update. A value ofTRUEcauses 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
TheTEReplaceStyleprocedure replaces any attribute in the current selection range that matches the attribute specified byoldStylewith that given bynewStyle. Only the character attributes specified bymodeare affected.Attribute changes are made directly to the style elements (
STElement) within the style table itself (TEStyleTable). If you specify the valuedoAllfor themodeparameter,newStylereplacesoldStyleoutright. Possible values for themodeparameter are defined by the following constants. TheTEReplaceStyleprocedure has no effect on a monostyled edit record.