Helper to make a multiline text that fills the width of its parent.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@733 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Bruno Garcia
2008-12-09 00:34:32 +00:00
parent 1df7613dfc
commit cd276073a2
+13
View File
@@ -72,6 +72,19 @@ public class FlexUtil
return t;
}
/**
* Create an uneditable/unselectable multiline Text widget with 100% width.
*/
public static function createWideText (text :String, style :String = null) :Text
{
var t :Text = new Text();
t.styleName = style;
t.percentWidth = 100;
t.selectable = false;
t.text = text;
return t;
}
/**
* How hard would it have been for them make Spacer accept two optional arguments?
*/