diff --git a/src/as/com/threerings/flex/FlexUtil.as b/src/as/com/threerings/flex/FlexUtil.as index e8aeb337..88cc45ba 100644 --- a/src/as/com/threerings/flex/FlexUtil.as +++ b/src/as/com/threerings/flex/FlexUtil.as @@ -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? */