You will need to compute and assign rowHeight.  Don’t forget to factor in 
viewMetrics.top and bottom.

% are not honored in ItemRenderers.  They are supposed to size to their data, 
and not external inputs.  You could get the renderer to report a measuredHeight 
by overriding measure() but you’d have to factor in the app’s padding and gaps 
and other stuff, so I think computing rowHeight is better.


On 3/12/10 12:49 PM, "Rodney Smith" <[email protected]> wrote:






I'm struggling to get items in a HorizontalList to be full height (as in 
height="100%", which is not honored by the HorizontalList container). I'm using 
an external itemRenderer based on VBox, but can't get the items to be the fill 
the height of the HorizontalList. If the HorizontalList is set to 
height="100%", how do I get the items in the list to also be 100% height?

Here's my simple code, with borders:
SampleHList.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
    layout="absolute">

    <mx:HorizontalList columnCount="3"
        itemRenderer="components.SampleView"
        height="100%"
        width="100%"
        borderStyle="solid"
        >
        <mx:ArrayCollection>
         <mx:Object category="Topic 1"/>
         <mx:Object category="Topic 2"/>
         <mx:Object category="Topic 3"/>
         <mx:Object category="Topic 4"/>
       </mx:ArrayCollection>
     </mx:HorizontalList>
</mx:Application>

And the contents of "components/SampleView.mxml":
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml";
    borderStyle="solid"
    borderColor="red"
    height="100%">
    <mx:Label text="{data.category}"/>
    <mx:Spacer height="100%"/>
    <mx:Label text="end of topic"/>
</mx:VBox>






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to