diff --git a/src/as/com/threerings/flex/FlexUtil.as b/src/as/com/threerings/flex/FlexUtil.as index 7f1228bb..e8aeb337 100644 --- a/src/as/com/threerings/flex/FlexUtil.as +++ b/src/as/com/threerings/flex/FlexUtil.as @@ -23,6 +23,7 @@ package com.threerings.flex { import mx.controls.Label; import mx.controls.Spacer; +import mx.controls.Text; import mx.core.Container; import mx.core.UIComponent; @@ -58,6 +59,19 @@ public class FlexUtil return createTipLabel(text, null, style); } + /** + * Create an uneditable/unselectable multiline Text widget with the specified text and width. + */ + public static function createText (text :String, width :int, style :String = null) :Text + { + var t :Text = new Text(); + t.styleName = style; + t.width = width; + t.selectable = false; + t.text = text; + return t; + } + /** * How hard would it have been for them make Spacer accept two optional arguments? */