ImageEn, unit iexLayers

TIETextLayer.EnableFormatting

TIETextLayer.EnableFormatting


Declaration


property EnableFormatting: Boolean;


Description


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).

Notes:
- The value for EnableFormatting specified by DefaultLayerEnableFormatting
- Setting EnableFormatting has no effect if IsRuler is enabled
- 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 in LayerOptions

Default: Specified by DefaultLayerEnableFormatting


Rich Text Limitations


The following are unsupported when EnableFormatting=True
- A FillColor is required. If clNone is specified, the background will be white
- 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


Demo


  Demos\LayerEditing\Layers_Text\TextLayers.dpr



Example


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




See Also


- SizeToText
- AutoSize
- TextOverflow
- Text
- EnableFormatting