Text does some weird stuff to measure if it doesn't have an explicitWidth.
You should be able to subclass TextArea and add numlines
Flex SDK Developer
Adobe Systems Inc.
Thanks for your answer, it has pointed me in the right direction, but I'm still a bit lost ...
- Where do I have to set explicitWidth? I've tried to set explicitWidth of the Text component instead of width but it made no difference.
- I've tried to subclass TextArea and use the internal TextField (setting its width and explicitWidth to that of the surrounding TextArea). When I run the application normally, the field is blank, but when I debug it, sometimes the text appears and is distributed evenly. Probably a timing issue. What methods do I have to call (of which object) to "commit" the new settings?
- How would get the HTML text of each line back from the textField? There is no method like getLineHtmlText(i). I could compare the text I got to the original HTML text and insert the tags at the right places but that seems a bit tedious. Is there a more elegant way?