Property TWPRTFDataCollectionBase.SpecialTextAttr[index] : TCharacterAttr
Unit: WPRTEDefs
Class: WPRTEDefs.TWPRTFDataCollectionBase
Description
SpecialTextAttr contains optional text rendering styles for HiddenText, Footnotes, Insertpoints (merge field start and end), Hyperlinks, SPANStyleObjects, AutomaticText (merge field content), ProtectedText, BookmarkedText, Text which was marked Inserted, text which wqas marked Deleted,. text which was marked highlighted, Text objects such as page numbers and table of contents.
Not all text styles are used by the rendering engine - you may use this elements:
wpInsertpoints, wpHyperlink, wpAutomaticText, wpBookmarkedText, wpFieldTextObjects
This code copies the text in an editor to a label and also copies the attribute setting:
Not all text styles are used by the rendering engine - you may use this elements:
wpInsertpoints, wpHyperlink, wpAutomaticText, wpBookmarkedText, wpFieldTextObjects
This code copies the text in an editor to a label and also copies the attribute setting:
var sp : TWPSpecialCharacterAttrKind;
begin
WPRichTextLabel1.RTFText.Assign(WPRichText1.Memo);
WPRichTextLabel1.RTFText.Apply;
for sp:=wpHiddenText to wpFieldTextObjects do
WPRichTextLabel1.RTFData.SpecialTextAttr[sp].Assign( WPRichText1.RTFData.SpecialTextAttr[sp] );
end;