Flex 3 - Resize effect "issue"?
I'm having a little issue with the resize event and resize effect of a VBox.
I have something like this:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
paddingBottom="15"
verticalGap="5"
width="210"
maxHeight="340"
resizeEffect="{resize}"
verticalScrollPolicy="off"
borderStyle="solid">
.
.
.
</mx:VBox>
<mx:Resize id="resize"/>
Inside the vbox, I have some items that collapse/expand depending on the user interaction. The problem is that when the user expands an item, the vbox resizes to its maximum height and then shrinks to fit the actua开发者_如何学Gol height.
Does anyone know how prevent it from resizing to its maximum height and shrinking back to its actual height??
Thanks for any help you can provide =)
Regards. BS_C3
From you question, it seems to have a problem with the maxHeight property being set. Maybe try removing maxHeight="340"
and replace with
resize="{if(container.height > 340) container.height = 340}"
Alternatively, place the VBox inside another container. Set the VBox height to 100%, and do the resizing on the outter container. Ive solved loads of resizing issues using this type of layout.
Try setting back to NaN to let Flex figure it out.
heightTo="{NaN}"
精彩评论