views:

251

answers:

2

In a Flex application I'm building I have an Accordion with a Tile component as shown:

<mx:Accordion id="accordionShoppingBasket" width="100%" resizeToContent="true">
 <mx:VBox width="100%" height="100%" >
  <mx:Tile id="tileOutNow" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20" verticalScrollPolicy="off" />                                     
 </mx:VBox>
 <mx:VBox width="100%" height="100%">
  <mx:Tile id="tileThisWeek" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
 </mx:VBox>
 <mx:VBox width="100%" height="100%">
  <mx:Tile id="tileFutureRelease" width="100%" height="100%" horizontalGap="12" verticalGap="30" paddingLeft="20" paddingRight="20" paddingBottom="20" paddingTop="20"/>
 </mx:VBox>
</mx:Accordion>

The items I'm adding to the tiles are a canvas with an image inside that.

The data for the tile is added via the addChild method; and this works for the first 4 rows of children, the accordion control resizes to accommodate the tile control. After the first 4 rows the children are still being added but the accordion no longer resizes to fit the content.

I'm not 100% sure what's causing this, any ideas?

Cheers Tony

A: 

Hmm, what do the parent(s) of the accordion look like? Meaning, could their height be restricting the height of the accordion?

Otherwise, posting more code might be necessary.

99miles
The parent is a a canvas which the height is set to 100%.
TWith2Sugars
Can you post the code?
99miles
A: 

Hmm, you want the Accordion resize to its content, BUT, you set the content size to 100% ... its look like an endless loop ...

Try removing the resizeToContent OR set a correct size for the children Tile(s) ...

eBuildy