2 Replies Latest reply on May 26, 2007 11:55 AM by Flex D

    variable row height in tileList?

      i need to make the rows in my tile list different heights, i see the property for variableRowHeight, but i cant figure out how to set it.
      the height of the row depends on the length of the text that i am loading in the itemRenderer(so that i dont get a scroll bar for the text). anyone know what to do? thanks.

        • 1. Re: variable row height in tileList?
          You could use something like this I guess:

          [Bindable] private var compHeight:int = 20;
          if( data.name.length > 40)
          compHeight = 20 * (data.name.length / 40);
          compHeight = 20;
          <mx:Text id="nameLbl"
          top="0" left="{compIndent}" width="100%" height="{compHeight}" textAlign="left"/>

          It needs some tweeking (for example setting the height in relation with the text length AND the width of the component) but it actually works for me...

          Hope it helps !

          • 2. Re: variable row height in tileList?
            Flex D
            The <mx:TileList> tag inherits all of the tag attributes of its superclass, but ignores the variableRowHeight and wordWrap tag attributes. It adds no additional tag attributes.