Procedure TParagraph.GetCharAttrAt(posinpar:Integer; ca:TWPCharAttr; CheckProtection:TWPInternalCheckProtect; DontReadAttributeBeforeSpace:Boolean)

Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph

Parameters

  • posinpar:Integer
  • ca:TWPCharAttr
  • CheckProtection:TWPInternalCheckProtect
  • DontReadAttributeBeforeSpace:Boolean

Description

Fill a TWPCharAttr record with the character attributes suggested (not: used) at a certain position. It uses extra code to determine if that position is at the end of a word or if the paragraph is empty - so this procedure is usually only used by Cursor.GetCharAttr.
To read out the exact values at pos_in_par use
RTFProps.Attributes.GetCharAttr(par.CharAttr[pos_in_par], Props).

Note: In contrast to this method does NOT check previous and next paragraphs to accquire the attribute index!

If the callback CheckProtection was specified only not protected characters will be examined.