Flex Setting form height dynamically
Posted
by Daryl
on Stack Overflow
See other posts from Stack Overflow
or by Daryl
Published on 2010-03-17T20:08:59Z
Indexed on
2010/03/17
20:11 UTC
Read the original article
Hit count: 144
I'm not sure if this is possible, is there a way to get the <mx:Form>
to set its own height based on the position of an element within it?
For example something like this:
<mx:Form height="{submitBtn.y + submitBtn.height}">
<mx:FormItem>... </mx:FormItem>
<mx:FormItem>... </mx:FormItem>
<mx:FormItem>... </mx:FormItem>
<mx:FormItem>
<s:Button id="submitBtn" label="Submit" />
</mx:FormItem>
</mx:Form>
where the form height
is dynamically set based on submitBtn's y position and its height.
I tried using Alert.show to show these values and turned out submitBtn.y = 0
and submitBtn.height
= 21. height sounds reasonable, but I know the y of submitBtn can't be 0 since it's below several other
Is it possible to set the form height dynamically?
© Stack Overflow or respective owner