 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls.beads
 {
+	import flash.display.DisplayObject;
 	import flash.display.DisplayObjectContainer;
 	import flash.events.Event;
+	import flash.events.IEventDispatcher;
 	import flash.text.TextField;
+	import flash.text.TextFieldAutoSize;
 	import flash.text.TextFieldType;
 	
 	import org.apache.flex.core.IBead;

			_textField.selectable = true;
			_textField.type = TextFieldType.INPUT;
			_textField.mouseEnabled = true;
			
			// for debug only
			_textField.border = true;
			_textField.borderColor = 0xFF0000;
		}
		private var textModel:ITextModel;
		
		private var _strand:IStrand;
		
		public function set strand(value:IStrand):void
		{

			// for input, listen for changes to the _textField and update
			// the model
			_textField.addEventListener(Event.CHANGE, inputChangeHandler);
			
			// set initial size, if present, and listen for changes in dimension
			var ww:Number = DisplayObject(value).width;
			var hh:Number = DisplayObject(value).height;
			
			if( !isNaN(ww) && ww > 0 ) _textField.width = ww;
			if( !isNaN(hh) && hh > 0 ) _textField.height = hh;
			IEventDispatcher(_strand).addEventListener("widthChanged", widthChangedHandler);
			IEventDispatcher(_strand).addEventListener("heightChanged", heightChangedHandler);
		}
		
		private function textChangeHandler(event:Event):void
