0 Replies Latest reply on Aug 18, 2006 3:19 AM by Stefan08

    dynamic height of mx:Text in List ItemRenderer

    Stefan08
      Hello,

      I want to have a list with line breaks if the width of the items is higher then the width of the list.
      I wrote my custon ItemRender but if i set the no height to the mx:Text there would be only first line tdisplayed on the list
      .
      My List looks like this
      <mx:List id="level1" dataProvider="{level1List}" width="100%" height="100%" change="selectLevel1ItemEvent(event)">
      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox height="100%">
      <mx:Text width="100%" height="40" text="{data.desc}"/>
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>
      </mx:List>

      The problem is that know all items have a height to fit an item with two lines. I want only have this if the width of an item is higher than the width of the list.

      Thanks,
      Stefan