feathersui-starling icon indicating copy to clipboard operation
feathersui-starling copied to clipboard

Text renderers: Truncate with a maximum line count

Open harry248 opened this issue 9 years ago • 2 comments

Would be nice to have some property like "maxLines" on TextFieldTextRenderer. Currently I have to subclass it to access the TextField instance and use the numLines property and the getLineOffset method to truncate the text.

harry248 avatar May 07 '15 08:05 harry248

UP vote! :+1:

I like the idea of max line count better than maxHeight, but maybe both could be supported.

GV3 avatar Aug 11 '15 16:08 GV3

Guys, GREAT NEWS!

I've just found the official TruncationOptions Class in the API.

Implementing this for the TLF will ensure that the text has a limit of text lines AND that the truncation indicator passed is used and the end of that line.

here is the link again: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/factory/TruncationOptions.html

GV3 avatar Oct 26 '16 17:10 GV3