ImageEn, unit iexLayers




property EnableFormatting: Boolean;


Specifies whether the text can be fully edited.
If EnableFormatting = True, the color, size and font of individual characters and words can be modified (and RichText can be used).
If EnableFormatting = False, the color, size and font of text is set for the entire layer using Font (and only Text can be used).

- The value for EnableFormatting specified by DefaultLayerEnableFormatting
- Setting EnableFormatting has no effect if RulerMode is iermLabel
- If you have not specified RichText, then Text will be used
- A toolbar is displayed when editing the text of a layer. This can be disabled by removing loShowRichTextToolbar from LayerOptions

Default: Specified by DefaultLayerEnableFormatting

Rich Text Limitations

The following are unsupported when EnableFormatting=True
- Text can only be rotated at 90 deg. angles
- A BorderRotate is not supported
- A TextOverflow is not supported
- Formatting is ignored when exporting to PDF or SVG
- It is recommended that you use solid fill color. Artefacts may be present with a transparent background.


Demo  Demos\LayerEditing\Layers_Text\TextLayers.dpr


// Set text as bold "ImageEn!"
TIETextLayer( ImageEnView1.CurrentLayer ).EnableFormatting := True;
TIETextLayer( ImageEnView1.CurrentLayer ).RichText := #123'\rtf1\ansi\ansicpg1252\deff0'#123'\fonttbl'#123'\f0\fnil\fcharset0 Tahoma;'#125#125'\viewkind4\uc1\pard\lang1033\b\f0\fs24 ImageEn!\b0\par'#125;

// Append a text layer
ImageEnView1.LayersAdd( ielkText );
TIETextLayer( ImageEnView1.CurrentLayer ).EnableFormatting := True;
TIETextLayer( ImageEnView1.CurrentLayer ).RichText := ...RTF formatted string...;

See Also

- SizeToText
- AutoSize
- TextOverflow
- Text
- EnableFormatting