Question

<mx:Tile width="100%" height="20">
    <mx:Button label="btn"/>
    <mx:Button label="btn"/>
    <mx:Button label="btn"/>
    <mx:Button label="btn"/>
    <mx:Button label="btn"/>
    <mx:Button label="btn"/>
</mx:Tile>

The above Tile has a height of 20. When I add 50 new buttons to it, a vertical scrollbar is added. How can I make it not show the scrollbar but change it's height dynamically so that all the added items are always shown. Kinda like an "expanding" tile.

Was it helpful?

Solution 2

The WindowShade component from flexlib solved this. It can be found here: http://code.google.com/p/flexlib/wiki/ComponentList (look for WindowShade)

Here's a sample: http://flexlib.googlecode.com/svn/trunk/examples/WindowShade_Sample.swf

OTHER TIPS

According to the Flex Documentation, the height of the Tile-container is set dynamically:

Default height of the Tile container is equal to (tile cell default height) x (rounded square root of the number of children), plus any gaps between children and any padding. Default width is equal to (tile cell default width) x (rounded square root of the number of children), plus any gaps between children and any padding.

I think removing the width and height should do the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top