Skip to main content
Jun 6, 2009 4:28 AM UTC
Answered

How to hide partial lines in a TextArea

I am using a TextArea component and programatically assigning some text to it.  Sometimes, the last line does not fit into the given width and height of the control.  Is there any way I can not show any lines that are partially displayed?

Any advice is welcome.

Thanks,

Om

This topic is closed to new replies. Start a new post to keep the conversation going.
GordonSmithCorrect answer
Participating Frequently
Jun 9, 2009 12:05 AM UTC

TextGraphicElement, the superclass of SimpleText and RichText, has an isTruncated():Boolean method.

Gordon Smith

Adobe Flex SDK Team

7 replies

Participating Frequently
Jun 15, 2009 8:57 PM UTC

It should report the correct value after the updateComplete event has been dispatched. If it isn't working, can you please file a bug at http://bugs.adobe.com/flex/?

Gordon Smith

Adobe Flex SDK Team

Translate
Jun 15, 2009 9:32 PM UTC

I have created the bug: https://bugs.adobe.com/jira/browse/SDK-21826

Thanks for the help.

Regards,

Om

Translate
GordonSmithCorrect answer
Participating Frequently
Jun 9, 2009 12:05 AM UTC

TextGraphicElement, the superclass of SimpleText and RichText, has an isTruncated():Boolean method.

Gordon Smith

Adobe Flex SDK Team

Translate
Jun 9, 2009 1:07 AM UTC

Perfect!  Thank you so much!!!

~Om

Translate
Participating Frequently
Jun 6, 2009 9:00 PM UTC

<s:TextArea> is designed to make it possible for a user to scroll through a large amount of text and doesn't have an option for showing only the lines that completely fit. But if you don't need scrolling, selection, or editing, you could use <s:RichText truncation="-1"> which would show you only the lines that fit.

Gordon Smith

Adobe Flex SDK Team

Translate
Jun 7, 2009 7:40 AM UTC

Gordon, that worked, thanks!  Is there any flag I can check to find out if a truncation has ocurred?  Or any event that I can listen to?

Thanks,

Om

Translate