Try setting maxDisplayedLines to a non-zero value.
On 5/19/10 6:52 AM, "tex_learning_flex" <[email protected]> wrote: All: fwiw, you _can_ specify the length of the label text as follows: text="{data.name.substr(0,35)}" where 35, in this case, is the sting length (obviously!). ... but, you don't get the ellipsis (...) as you did in TruncateToFit (Flex 3?) that's what I want to do!? Tex --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "tex_learning_flex" <tex.learning.f...@...> wrote: > > > > > > > Alex, > > truncation may work for SimpleText but when adding truncate to Label it > appears that it is NOT supported, and the following error is generated: > > Cannot resolve attribute 'truncation' for component type > spark.components.Label. TEST_ItemRenderer.mxml /TestProject/src/ line 70 Flex > Problem > > > any idea of how to truncate LABEL text? > > many thanks, > > Tex > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , > Alex Harui <aharui@> wrote: > > > > There are examples in the doc and on FlexExamples.com > > > > > > On 4/27/10 11:36 PM, "msrilatha_reddy" <msrilatha_reddy@> wrote: > > > > > > > > > > > > > > Hello Alex, > > > > Thanks for the reply! > > We didnt use embedded fonts anywhere in our application. > > Could you please give an example of using embedded fonts for a Label?? > > It would be great if you could modify the example which i have given to > > work with embedded fonts. > > > > Thanks, > > Srilatha M > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> , Alex Harui <aharui@> wrote: > > > > > > Yes. > > > > > > > > > On 4/23/10 5:06 AM, "msrilatha_reddy" <msrilatha_reddy@> wrote: > > > > > > > > > > > > > > > > > > > > > Hi Alex, > > > > > > I didnt use any embedded fonts. Do i need to use embedded fonts here to > > > solve the issue? > > > > > > Thanks, > > > Srilatha > > > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > > > <mailto:flexcoders%40yahoogroups.com> > > > <mailto:flexcoders%40yahoogroups.com> , Alex Harui <aharui@> wrote: > > > > > > > > I don't see any embedded fonts. > > > > > > > > > > > > On 4/22/10 1:54 AM, "msrilatha_reddy" <msrilatha_reddy@> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > I am facing an issue while scaling a Label with truncateToFit property > > > > as true. While zooming in/out, sometimes the text which is truncated is > > > > displayed without ellipses or 1 or 2 ellipses sometimes. I tried > > > > setting fontAntiAliasType="animation" thinking that it might solve the > > > > issue. > > > > But it didnt :-( > > > > > > > > Please find the code below: > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > > > layout="absolute" xmlns:local="*"> > > > > <mx:Script> > > > > <![CDATA[ > > > > private function zoom():void > > > > { > > > > c.scaleY = slider.value / 100; > > > > c.scaleX = slider.value / 100; > > > > } > > > > > > > > ]]> > > > > </mx:Script> > > > > <mx:Canvas id="c" x="109″ y="111″ width="156″ > > > > height="41″ scaleX="0.5″ scaleY="0.5″> > > > > <mx:Label id="l1″ x="28″ y="10″ > > > > text="Labelgettingtruncatedddddddddd" width="100″ > > > > truncateToFit="true" fontAntiAliasType="animation"/> > > > > </mx:Canvas> > > > > <mx:VSlider id = "slider" > > > > minimum = "5″ > > > > maximum = "200″ > > > > value = "100″ > > > > snapInterval = ".001″ > > > > liveDragging = "true" > > > > change = "zoom()"/> > > > > </mx:Application> > > > > > > > > Could anyone of you help me finding whats going wrong here? > > > > > > > > Thanks in Advance, > > > > Srilatha > > > > > -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui

