<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Flex 3 Auto-Resize TextInput Control? How?</title>
	<atom:link href="http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/feed/" rel="self" type="application/rss+xml" />
	<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/</link>
	<description>My blog on Flash, Flex, eLearning</description>
	<lastBuildDate>Thu, 05 Nov 2009 07:05:16 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: murugesan munusamy</title>
		<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/#comment-3233</link>
		<dc:creator>murugesan munusamy</dc:creator>
		<pubDate>Thu, 17 Sep 2009 05:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://tush.wordpress.com/?p=83#comment-3233</guid>
		<description>Thanks for the post.</description>
		<content:encoded><![CDATA[<p>Thanks for the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trevorc</title>
		<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/#comment-3230</link>
		<dc:creator>trevorc</dc:creator>
		<pubDate>Thu, 10 Sep 2009 09:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://tush.wordpress.com/?p=83#comment-3230</guid>
		<description>Tushar &amp; DIGITALUnderworld 

If I &quot;Focus Into&quot; or &quot;Press Right Arrow&quot; on the End of input Text, it scrolls.

Josh

doesn&#039;t have that Problem, but width would fit for shorter Text (also at the beginning)</description>
		<content:encoded><![CDATA[<p>Tushar &amp; DIGITALUnderworld </p>
<p>If I &#8220;Focus Into&#8221; or &#8220;Press Right Arrow&#8221; on the End of input Text, it scrolls.</p>
<p>Josh</p>
<p>doesn&#8217;t have that Problem, but width would fit for shorter Text (also at the beginning)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DIGITALUnderworld</title>
		<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/#comment-3218</link>
		<dc:creator>DIGITALUnderworld</dc:creator>
		<pubDate>Mon, 10 Aug 2009 18:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://tush.wordpress.com/?p=83#comment-3218</guid>
		<description>Better way:

package components {
	
	import flash.events.Event;
	
	import mx.controls.TextInput;  

	public class AutoSizeTextInput extends TextInput {  
		
		private var txtSpan:uint = 10;
		
		public function AutoSizeTextInput() {  
			super();  
			this.addEventListener(Event.CHANGE, onTextChange);   
		}
		
		private function onTextChange(evnt:Event):void {  
			this.textField.scrollH = 0;
			this.width = this.autoSizeWidth;
		}  

		override protected function commitProperties():void {  
			super.commitProperties();  
			this.textField.scrollH = 0;
			this.width = this.autoSizeWidth;
			this.validateNow();
		}
		  
		private function get autoSizeWidth():uint {
			var retValue:uint = this.textWidth + txtSpan;
			
			 if( this.minWidth &gt; this.textWidth + txtSpan )
    			retValue = this.minWidth;

   				return retValue;  
		}  
	}  
}</description>
		<content:encoded><![CDATA[<p>Better way:</p>
<p>package components {</p>
<p>	import flash.events.Event;</p>
<p>	import mx.controls.TextInput;  </p>
<p>	public class AutoSizeTextInput extends TextInput {  </p>
<p>		private var txtSpan:uint = 10;</p>
<p>		public function AutoSizeTextInput() {<br />
			super();<br />
			this.addEventListener(Event.CHANGE, onTextChange);<br />
		}</p>
<p>		private function onTextChange(evnt:Event):void {<br />
			this.textField.scrollH = 0;<br />
			this.width = this.autoSizeWidth;<br />
		}  </p>
<p>		override protected function commitProperties():void {<br />
			super.commitProperties();<br />
			this.textField.scrollH = 0;<br />
			this.width = this.autoSizeWidth;<br />
			this.validateNow();<br />
		}</p>
<p>		private function get autoSizeWidth():uint {<br />
			var retValue:uint = this.textWidth + txtSpan;</p>
<p>			 if( this.minWidth &gt; this.textWidth + txtSpan )<br />
    			retValue = this.minWidth;</p>
<p>   				return retValue;  <br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tushar</title>
		<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/#comment-3083</link>
		<dc:creator>Tushar</dc:creator>
		<pubDate>Fri, 21 Nov 2008 09:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://tush.wordpress.com/?p=83#comment-3083</guid>
		<description>I tried this before but was not working for me in Flex 3!</description>
		<content:encoded><![CDATA[<p>I tried this before but was not working for me in Flex 3!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Tynjala</title>
		<link>http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/#comment-3082</link>
		<dc:creator>Josh Tynjala</dc:creator>
		<pubDate>Fri, 21 Nov 2008 00:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://tush.wordpress.com/?p=83#comment-3082</guid>
		<description>It was written for Flex 2, but it should still work. Here&#039;s my &lt;a href=&quot;http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1034866&quot; rel=&quot;nofollow&quot;&gt;Auto-Resizing TextInput control for Flex&lt;/a&gt;. It takes a different approach to the implementation.</description>
		<content:encoded><![CDATA[<p>It was written for Flex 2, but it should still work. Here&#8217;s my <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1034866" rel="nofollow">Auto-Resizing TextInput control for Flex</a>. It takes a different approach to the implementation.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
