MultiLine Label in Flex
Posted on September 28, 2010 | Comments Off on MultiLine Label in Flex
If you are using the
So, here is what I wrote quickly to achieve this functionality.
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 <a href="http://blogtorn.com/images/">where do you buy viagra | buy cialis phentermine | cheap levitra online</a> display the label.
<a href="http://amoxil-pharm.net">buy penicillin</a> if (!textField)
{
textField = new UITextField();
textField.styleName = this;
addChild(DisplayObject(textField));
}
super.createChildren();
textField.multiline = true;
textField.wordWrap = true;
textField.autoSize = TextFieldAutoSize.LEFT;
}
}
}
Incoming search terms:
- blog (2034)
Tags: autoSize | createChildren() | DisplayObject() | multiline | TextFieldAutoSize | UITextField() | wordWrap
Sameera at LinkedIn
