I am experiencing a bug with the List component when using 
variableRowHeights="true" . The bug occurs when the first item in the 
list is very big. Basically, the list 'blows out' its minimum height 
unnecessarily to the point where you lose the bottom scroll arrow.


The following example demonstrates this ... I did already file a bug for 
this, but I am hoping there is a workaround for now.

Thanks,
-Daniel

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
    <mx:Script>
        <![CDATA[
           
           
            // An array of heights with a big first element (broken)
            private var heights1 : Array = [400, 60, 90, 43, 50, 69, 80, 
90, 90 ];
           
            // An array of heights with a small first element (works)
            private var heights2 : Array = [40, 60, 90, 43, 500, 69, 80, 
90, 90 ];
           
            // Set this to heights2 to experience working behavior
            private var dp : Array = heights1;
        ]]>
    </mx:Script>
    <mx:HBox height="400" verticalScrollPolicy="off">
        <mx:List dataProvider="{ dp }" columnWidth="260" 
variableRowHeight="true"  height="100%">
            <mx:itemRenderer>
                   <mx:Component>
                       <mx:VBox 
xmlns:mx="http://www.adobe.com/2006/mxml"; horizontalAlign="left"  
backgroundColor="#999999" verticalAlign="top" 
                               width="100%"  borderColor="White" 
borderStyle="solid"
                               height="{ Number(data) }">
                               <mx:Button label="Button" width="230" 
height="25"  />
                       </mx:VBox>
                   </mx:Component>
               </mx:itemRenderer>
        </mx:List>       
    </mx:HBox>
</mx:Application>

Reply via email to