I have code like the following:
<s:VGroup gap="10" id="group" height="100%">
<s:Label text="This is page 2" />
<s:Button content="Resize Canvas" click="resize(event);"/>
<mx:Canvas id="photoCanvas" color="#567898" backgroundColor="#125567">
</mx:Canvas>
</s:VGroup>
I don’t understand why the following does not work:
pushing the Button resizes the photoCanvas’s height (gets taller or smaller). Since the photoCanvas control is a child element of the VGroup shouldn’t the container update itself to the new height?
The Vgroup has ALWAYS the same height, no matter what the (total) height of the children is!
I would like the VGroup to adjust itself and get a height value equal to the sum of its children heights.
Is this not possible??
The VGroup is already at 100%, it can’t get any larger… If you want it to resize to it’s children, don’t set a height/width in the VGroup.