English 中文(简体)
Tile inside Accordion does not resize correctly
原标题:

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

问题回答

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) ...

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.





相关问题
Possible/howto resize iframe on mouse focus?

I have two iframes next to each other at 50% width and am wondering if it s possible to resize one iframe to 80% when that iframe is moused over. Is it possible? If so, can someone post a small how-to ...

How to resize linked images dynamically in PHP?

On my site I have given an option to user to choose thier profile image Type link of an image Image is a url link, and first I want it to resize to 400x300 (image s original size doesn t matter), ...

Calculate the bounding box of a GDI+ drawing

I am drawing an image from MetaFile (emf) and then apply some rotation transformations to it all within the OnPaint of a UserControl. After applying those transformation how can I calculate the normal ...

Tile inside Accordion does not resize correctly

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%...

Resizing an image

The code below works very well for resizing an image by aspect ratio by height and I can also create a separate function by width. But i m not always sure if an image will need to be shrunk by height ...

热门标签