Newer
Older
CEE_VE50 / com / digitec / cee / StyledTextArea.as
@cwolsen cwolsen on 23 Aug 2019 1 KB Ckeaning up commented out code.
package com.digitec.cee
{
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	//import mx.controls.TextArea;
	import fl.controls.TextArea;
	
	/**
	 * This class provides a simple workaround to let you set
	 * the <code.styleSheet</code> property of a TextArea control.
	 */
	public class StyledTextArea extends TextArea
	{
		/**
		 * Overrides the <code>TextArea.createChildren()</code>
		 * method to use a StyledUITextField object instead of
		 * a UITextField object.
		 */
		override protected function createChildren():void
		{
			textField = new StyledUITextField();
			
			textField.autoSize = TextFieldAutoSize.NONE;	
			textField.enabled = enabled;
			textField.ignorePadding = true;
			textField.multiline = true;
			textField.selectable = true;
			textField.styleName = this;
			textField.tabEnabled = true;
			textField.type = TextFieldType.INPUT;
			textField.useRichTextClipboard = true;
			textField.wordWrap = true;
	
            addChild(textField);
	
			super.createChildren();
		}
	}
}