I'm creating an Accordion from run-time XML using a repeater. I'm able
to populate the accordion with the code below but, as is, the body is
sized to the height of the largest element resulting in lots of blank
space in those elements that don't have much text.

Ideally, each accordion body would size itself to the height of the
text for the given record. Possible?

thx


<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml";
initialize="modulesSrv.send();">

    <mx:HTTPService id="modulesSrv" url="xml/modules.xml"/>

        <mx:Accordion id="contents" height="100%" width="200" >
                <mx:Repeater id="rep" 
dataProvider="{modulesSrv.lastResult.row.Module}" >
                <mx:VBox height="100%" width="200" id="accHead"
label="{rep.currentItem.ModuleName}" verticalScrollPolicy="off" >
                        <mx:Label text="{rep.currentItem.ModuleTitle}"/>
                        <mx:Text height="100%" width="175" >
                            <mx:htmlText>
                                {rep.currentItem.ModuleDesc}
                            </mx:htmlText>                              
                        </mx:Text>              
                </mx:VBox>
                </mx:Repeater>
        </mx:Accordion>
        
</mx:Canvas>

Reply via email to