1 Reply Latest reply on Sep 9, 2011 11:46 AM by Jason Szeto

    flex 4 counterpart for label in width-limiting canvas




      What i want to achieve:

      I have a limited space to show some text. Let's say one line of text with a width of 100. I need to display some dynamic text in this space. Sometimes the text will fit in the space, sometimes it will be to wide. When it is to wide, i'm gonna change the x postion of the text over time so that it scroll's through the limited space


      How i did this in flex 3:

      I create a canvas with no horizontal scroll bar and put a label in it. Adjust the x position of the label over time.


      Now i want to do the same thing in flex 4. I created a group component with a width of 100 and placed a label in it.


      Problem: I notice that when a wider string must be displayed, the text is displayed beyond the 100 pixels: the label is displayed larger than the width of it's parent component.


      How should i do this?

      I could just keep on using the canvas component but my goal is to only use flex 4 components..