Hi All!
I have a container and Label instance inside it. Unfortunately,
truncateToFit does not work if Label instance width is set in percent.
Please, take a look at the example below:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%"
height="100%">
<mx:Box width="25%">
<mx:Label width="100%" text="Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aenean ligula. Sed eget pede sed metus
nonummy rhoncus. Nam
congue, tortor nec dignissim tincidunt, augue
odio volutpat sem, non vulputate lectus nulla vitae leo. Vestibulum
aliquet bibendum felis. Aenean in turpis mattis tellus tempus sodales.
Nulla sem. Maecenas lobortis pharetra lacus. Fusce non odio nec massa
auctor pharetra. Aenean vulputate posuere justo. Nulla vitae eros vel
eros aliquet euismod." />
</mx:Box>
</mx:Application>
On the other hand, if I assign fixed width to Label instance,
everything works ok:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%"
height="100%">
<mx:Box width="25%">
<mx:Label width="200" text="Lorem ipsum dolor sit amet,
consectetuer
adipiscing elit. Aenean ligula. Sed eget pede sed metus nonummy
rhoncus. Nam
congue, tortor nec dignissim tincidunt, augue odio
volutpat sem, non vulputate lectus nulla vitae leo. Vestibulum aliquet
bibendum felis. Aenean in turpis mattis tellus tempus sodales. Nulla
sem. Maecenas lobortis pharetra lacus. Fusce non odio nec massa auctor
pharetra. Aenean vulputate posuere justo. Nulla vitae eros vel eros
aliquet euismod." />
</mx:Box>
</mx:Application>
But in my case Label width should be set in percents.
Sergey.