ImageEn, unit iexRichEdit

TIERichEdit.InsertFormattedText

TIERichEdit.InsertFormattedText


Declaration

procedure InsertFormattedText(Index: Integer; const NewText: string; const AFont: TFont = nil); overload;
procedure InsertFormattedText(Index: Integer; const NewText: string; FontStyle: TFontStyles; const FontName: string; const FontColor: TColor; FontHeight: Integer); overload;


Description

Insert formatted text at the specified position.

Note: FontHeight specifies the height pixels, not points.


Example

// Insert Bold red text
IERichEdit1.InsertFormattedText( IERichEdit1.SelStart, 'RED TEXT', [fsBold], 'Tahoma', clRed, 18 );