Added this, since we do it lots of places and it often looks like an error.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@617 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2008-08-08 23:11:16 +00:00
parent 51cf6b65be
commit 5de8a3acf7
+13
View File
@@ -24,6 +24,8 @@ package com.threerings.flex {
import mx.controls.Label;
import mx.controls.Spacer;
import mx.core.UIComponent;
/**
* Flex-related utility methods.
*/
@@ -52,5 +54,16 @@ public class FlexUtil
spacer.height = height;
return spacer;
}
/**
* In flex the 'visible' property controls visibility separate from whether
* the component takes up space in the layout, which is controlled by 'includeInLayout'.
* We usually want to set them together, so this does that for us.
*/
public static function setVisible (component :UIComponent, visible :Boolean) :void
{
component.visible = visible;
component.includeInLayout = visible;
}
}
}