AppendText Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPParInterface                                                workswithseltext

Declaration

procedure AppendText(const NewText: WideString; CharAttr: Integer);

Description

This method appends text to the end of this paragraph. CharAttr can be usually passed as 0.

Parameters

Text

Unicode string

CharAttr

CharAttr is the index of the character attribute record to be used for the inserted data.

Special values:

0:Use the attribute of the preceding text or the current attribute in case the paragraph is empty.

-1:Use the attribute of the preceding text or the paragraph default attribute if at first position in paragraph.

-2: use current writing mode (CurrAttr).

-3: use the document default attribute -4: don't assign an attribute (CharAttr=0)

 

C# Example:

Memo.CurrAttr.Clear();

Memo.CurrAttr.SetFontface("Arial");

Memo.CurrAttr.SetFontSize(11);

Memo.CurrAttr.IncludeStyles(2); // Italic!

// append text using the current writing mode

Memo.CurrPar.AppendText("Some bold text", -2);


[idh_iwpparinterface_appendtext.htm]    Copyright © 2007 by WPCubed GmbH