Skip to main content
June 6, 2009
Answered

How to hide partial lines in a TextArea

  • June 6, 2009
  • 7 replies
  • 1454 views

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.
Correct answer GordonSmith

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

Gordon Smith

Adobe Flex SDK Team

7 replies

Participating Frequently
June 15, 2009

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

June 15, 2009

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

Thanks for the help.

Regards,

Om

GordonSmithCorrect answer
Participating Frequently
June 9, 2009

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

Gordon Smith

Adobe Flex SDK Team

June 9, 2009

Perfect!  Thank you so much!!!

~Om

Participating Frequently
June 6, 2009

<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

June 7, 2009

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