13 Replies Latest reply on Jan 16, 2011 9:13 PM by Flex harUI

    Problem with List having content with variable row height

    abhinav1singhal Level 1

      Hi All,

      I am having  problem with List, in which I want to scroll through the inner content ; as the orignal height of the List is fixed. Here is the sample code to depict the same problem.

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application
      xmlns:mx="http://www.adobe.com/2006/mxml"
      layout="
      vertical"
      verticalAlign="
      middle"
      backgroundColor="
      white"
      creationComplete="init();"
      >
      <mx:Script>
      <![CDATA[
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.collections.ArrayCollection;
      [
      Bindable]
      public var arrayCollection:ArrayCollection = new ArrayCollection([
      {indexNo :
      '2',description:'This text.The following example shows how you can create multi-line rows with wrapping text and variable row heights with the Flex List control should appear on more then one line of text and it will definetly appear lets try.'}
      ]);
      private function init():void {
      list.dataProvider=arrayCollection;
      }
      ]]>
      </mx:Script>
      <mx:List id="list"
      height="
      50"
      wordWrap="
      true"
      labelField="
      description"
      variableRowHeight="
      true"
      width="
      250"
      />
      <mx:Label text="Label"/>
      </mx:Application>