InsertTextEx
Description
Inserts text at the cursor position with the ability to specify color, size, style and font name.
procedure InsertTextEx (const text: String; FontColor: TColor = -1; FontSize: integer = -1; FontStyles: Integer = -1; FontName: string = '');
Parameter |
Description |
text |
Text may contain special characters:CR, LF, TAB, FF (#13, #10, #9, #12). |
FontColor |
Optional parameter. Font color. More about type TColor. |
FontSize |
Optional parameter. Font size. |
FontStyles |
Optional parameter. Font style. Available values: fsBold, fsItalic, fsUnderline, fsStrikeout |
FontName |
Optional parameter. Font name. |
Example
Form1.RichEdit1.InsertTextEx('text', clRed, 16, fsBold+fsItalic+fsUnderline+fsStrikeout, 'Arial');
Form1.RichEdit1.InsertTextEx('text', clGreen, 14, fsBold+fsItalic);