Return to Snippet

Revision: 33818
at October 13, 2010 23:03 by shalomfriss


Initial Code
package components
{
 import mx.core.UITextField;
 import flash.text.TextFieldAutoSize;
 import mx.controls.Label;
 import flash.display.DisplayObject;

 public class MultiLineLabel extends Label
 {

 override protected function createChildren() : void
 {
 // Create a UITextField to display the label.
 if (!textField)
 {
 textField = new UITextField();
 textField.styleName = this;
 addChild(DisplayObject(textField));
 }
 super.createChildren();
 textField.multiline = true;
 textField.wordWrap = true;
 textField.autoSize = TextFieldAutoSize.LEFT;
 }
 }
}

Initial URL

                                

Initial Description

                                

Initial Title
Flex Multiline Label

Initial Tags
textmate, actionscript, 3, Flex

Initial Language
Other