ImageEn, unit iexLayers

TIETextLayer.TextOverflow

TIETextLayer.TextOverflow


Declaration

property TextOverflow: TIETextOverflow;


Description

Specifies what occurs when the text is too big to be displayed within the layer.
Value Description
ieoTruncate Text that is too wide for display will be truncated and appended with ellipses (e.g. Long Te...)
ieoShrink Text that is too wide for display will be have the font size automatically reduced
ieoHide If text is too wide for display it is hidden

Note:
TextOverflow has no effect if WordWrap=True.
To limit the area of the text to the shape when AspectRatioLocked=True, ensure Alignment=iejCenter and Layout=ielCenter.

Default: ieoTruncate


Examples

// Make text that is too big for display automatically shrink to a smaller font size
TIETextLayer( ImageEnView1.CurrentLayer ).TextOverflow := ieoShrink;
ImageEnView1.Update();


// Add a "Shape" layer with vertically offset text
ImageEnView1.LayersAdd( ielkText, 200, 200, 230, 200 );
ImageEnView1.CurrentLayer.AspectRatioLocked            := True;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderShape  := iesHeart;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderWidth  := 0;
TIETextLayer( ImageEnView1.CurrentLayer ).BorderColor  := clNone;
TIETextLayer( ImageEnView1.CurrentLayer ).FillColor    := $004646FF;
TIETextLayer( ImageEnView1.CurrentLayer ).Font.Style   := [fsBold];
TIETextLayer( ImageEnView1.CurrentLayer ).Alignment    := iejCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).Layout       := ielCenter;
TIETextLayer( ImageEnView1.CurrentLayer ).WordWrap     := False;
TIETextLayer( ImageEnView1.CurrentLayer ).Text         := 'I Heart Delphi';
TIETextLayer( ImageEnView1.CurrentLayer ).Font.Size    := 22;
TIETextLayer( ImageEnView1.CurrentLayer ).TextOverflow := ieoShrink;
TIETextLayer( ImageEnView1.CurrentLayer ).TextOffsetY  := -0.15;
ImageEnView1.Update();




See Also

Text
Font