Expand Component Height with Unknown Value in Flex0
If you have a collapsed component with height = 0 and want to expand this component and you don't know what will be the new height value. The only info you have is that you want to expand it. How will you set the new height value ?!!
Easily:
var dumyNumber:Number; // just NaN mycomponent.height = dumyNumber; That is all :). But if you tried the following it will not work:
mycomponent.height = NaN; // won't work only assigned to a variable is valid
You can also set mycomponent.percentHeight = 100. But what if you want to make a resize transition? In this case you must set heightTo value to NaN
My case was as the following:
var expand:Resize = new Resize();
expand.target = mycomponent;
expand.heightTo = dumyNumber;
In this case, I must set heightTo value and can't set it to 100%

0 Comments
No comments have been made on this post.
Leave a Comment...