<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Li Guoliang &#187; TextArea</title>
	<atom:link href="http://liguoliang.com/tag/textarea/feed/" rel="self" type="application/rss+xml" />
	<link>http://liguoliang.com</link>
	<description>ActionScript Flex Java JEE PHP...</description>
	<lastBuildDate>Mon, 21 May 2012 17:04:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Flex4 Spark TextArea 设置自适应大小及派发鼠标滚动事件</title>
		<link>http://liguoliang.com/2010/auto-resizable-text-area-component/</link>
		<comments>http://liguoliang.com/2010/auto-resizable-text-area-component/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 08:43:16 +0000</pubDate>
		<dc:creator>Guoliang</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[TextArea]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2010/auto-resizable-text-area-component/</guid>
		<description><![CDATA[记得在使用Flex4之前, 看过一篇<a href="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/">介绍TextArea自适应高度的文章</a>, 监听Event, 动态改变高度.&#160; 很少用TextArea, 也没用过. 在Flex4， 使用Spark界面时, TextArea可设为自动适应. 
设置heightInLines = NaN -&#160; 如果<p class='read-more'><a href='http://liguoliang.com/2010/auto-resizable-text-area-component/'>More...</a></p><p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></description>
			<content:encoded><![CDATA[<p>记得在使用Flex4之前, 看过一篇<a href="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/">介绍TextArea自适应高度的文章</a>, 监听Event, 动态改变高度.&#160; 很少用TextArea, 也没用过. 在Flex4， 使用Spark界面时, TextArea可设为自动适应. </p>
<p>设置heightInLines = NaN -&#160; 如果该属性为 <code>NaN</code>（默认值），则组件的默认高度由要显示的文本确定。     <br />See: <a title="http://tinyurl.com/2ubwrta" href="http://tinyurl.com/2ubwrta">http://tinyurl.com/2ubwrta</a></p>
<p>但当鼠标在TextArea之上时, 鼠标滚动, 整个Application的scrollbar竟然没反应&#8230;猜是没有dispatch event, 于是增加监听函数:</p>
<pre class="code" name="java">	/** 响应TextArea的鼠标滚动事件, 接收到后派发出去, 以便引起外部UI可获得该事件, 并进行响应的滚动. */
	protected function onMouseEventWheel(e:MouseEvent):void {
		dispatchEvent(e);
	}</pre>
<p>妥了. </p>
<p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></content:encoded>
			<wfw:commentRss>http://liguoliang.com/2010/auto-resizable-text-area-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex: 自适应大小TextArea, Resizable TextArea</title>
		<link>http://liguoliang.com/2009/flex-%e8%87%aa%e9%80%82%e5%ba%94%e5%a4%a7%e5%b0%8ftextarea-resizable-textarea/</link>
		<comments>http://liguoliang.com/2009/flex-%e8%87%aa%e9%80%82%e5%ba%94%e5%a4%a7%e5%b0%8ftextarea-resizable-textarea/#comments</comments>
		<pubDate>Fri, 08 May 2009 15:53:32 +0000</pubDate>
		<dc:creator>Guoliang</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[TextArea]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/05/916/</guid>
		<description><![CDATA[Flex3中: <a title="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/" href="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/">http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/</a>
Flex4 Spark组件已支持自适应高度: <a href="http://liguoliang.com/2010/auto-resizable-text-area-component/">http://liguoliang.com/2010/auto-resizable-text-ar</a><p class='read-more'><a href='http://liguoliang.com/2009/flex-%e8%87%aa%e9%80%82%e5%ba%94%e5%a4%a7%e5%b0%8ftextarea-resizable-textarea/'>More...</a></p><p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Flex3中: <a title="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/" href="http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/">http://www.flexer.info/2009/02/06/auto-resizable-text-area-component/</a></p>
<p>Flex4 Spark组件已支持自适应高度: <a href="http://liguoliang.com/2010/auto-resizable-text-area-component/">http://liguoliang.com/2010/auto-resizable-text-area-component/</a></p>
<p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></content:encoded>
			<wfw:commentRss>http://liguoliang.com/2009/flex-%e8%87%aa%e9%80%82%e5%ba%94%e5%a4%a7%e5%b0%8ftextarea-resizable-textarea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex: 输入组件 &#8211; TextInput, ComboBox, Radiobutton, TextArea等 对其输入内容进行验证</title>
		<link>http://liguoliang.com/2009/flex-%e8%be%93%e5%85%a5%e7%bb%84%e4%bb%b6-textinput-combobox-radiobutton-textarea%e7%ad%89-%e5%af%b9%e5%85%b6%e8%be%93%e5%85%a5%e5%86%85%e5%ae%b9%e8%bf%9b%e8%a1%8c%e9%aa%8c%e8%af%81/</link>
		<comments>http://liguoliang.com/2009/flex-%e8%be%93%e5%85%a5%e7%bb%84%e4%bb%b6-textinput-combobox-radiobutton-textarea%e7%ad%89-%e5%af%b9%e5%85%b6%e8%be%93%e5%85%a5%e5%86%85%e5%ae%b9%e8%bf%9b%e8%a1%8c%e9%aa%8c%e8%af%81/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 06:01:21 +0000</pubDate>
		<dc:creator>Guoliang</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[RadioButton]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[TextInput]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/02/780/</guid>
		<description><![CDATA[如: 某编辑器:
<a href="http://liguoliang.com/wp-content/uploads/2009/02/image5.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="186" alt="image" src="http://liguoliang.com/wp-content/uploads/2009/02/image-thumb5.png" width="645" border="0" /></a>
代码:
textName.addEventListener(Event.CHANGE, onTextNameChange);//增加监听函数,监听EventChange, 如果不需实时验证, 可监听FlexEvent.VALUE_COMMIT事件.
	 //-----------<p class='read-more'><a href='http://liguoliang.com/2009/flex-%e8%be%93%e5%85%a5%e7%bb%84%e4%bb%b6-textinput-combobox-radiobutton-textarea%e7%ad%89-%e5%af%b9%e5%85%b6%e8%be%93%e5%85%a5%e5%86%85%e5%ae%b9%e8%bf%9b%e8%a1%8c%e9%aa%8c%e8%af%81/'>More...</a></p><p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></description>
			<content:encoded><![CDATA[<p>如: 某编辑器:</p>
<p><a href="http://liguoliang.com/wp-content/uploads/2009/02/image5.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="186" alt="image" src="http://liguoliang.com/wp-content/uploads/2009/02/image-thumb5.png" width="645" border="0" /></a></p>
<p>代码:</p>
<pre class="java" name="code">textName.addEventListener(Event.CHANGE, onTextNameChange);//增加监听函数,监听EventChange, 如果不需实时验证, 可监听FlexEvent.VALUE_COMMIT事件.
	 //------------------Validation - Name -  on Event.Change------------
	 private function onTextNameChange(e:Event = null):void {
		if(StringUtils.trim(textName.text).length &lt; 2) {
			textName.errorString = &quot;Name不能少于2个字符, 请重新输入&quot;;
		}else if(StringUtils.trim(textName.text) == &quot;String&quot;) {
			textName.errorString = &quot;Name不可为'String'&quot;;
		}else {
			textName.errorString = null;
		}
		setButton();
	 }</pre>
<p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></content:encoded>
			<wfw:commentRss>http://liguoliang.com/2009/flex-%e8%be%93%e5%85%a5%e7%bb%84%e4%bb%b6-textinput-combobox-radiobutton-textarea%e7%ad%89-%e5%af%b9%e5%85%b6%e8%be%93%e5%85%a5%e5%86%85%e5%ae%b9%e8%bf%9b%e8%a1%8c%e9%aa%8c%e8%af%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>监听Flex中TextArea的DoubleClick Event</title>
		<link>http://liguoliang.com/2008/%e7%9b%91%e5%90%acflex%e4%b8%adtextarea%e7%9a%84doubleclick-event/</link>
		<comments>http://liguoliang.com/2008/%e7%9b%91%e5%90%acflex%e4%b8%adtextarea%e7%9a%84doubleclick-event/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 08:08:34 +0000</pubDate>
		<dc:creator>Guoliang</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[TextArea]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2008/10/236/</guid>
		<description><![CDATA[在TextArea中显示一段文字, 在双击时打开一个弹出的编辑窗口, 或者使之的Editable由false变为true. 需要先监听DoubleClick.
但作为一嫩鸟, 我总是发现他监听不了, click可以,但DoubleClick不可以.
自习看了TextArea的API,发现他有个继承自<p class='read-more'><a href='http://liguoliang.com/2008/%e7%9b%91%e5%90%acflex%e4%b8%adtextarea%e7%9a%84doubleclick-event/'>More...</a></p><p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></description>
			<content:encoded><![CDATA[<p>在TextArea中显示一段文字, 在双击时打开一个弹出的编辑窗口, 或者使之的Editable由false变为true. 需要先监听DoubleClick.</p>
<p>但作为一嫩鸟, 我总是发现他监听不了, click可以,但DoubleClick不可以.</p>
<p>自习看了TextArea的API,发现他有个继承自UIComponent的DoubleClick的属性,该属性默认为False,将之设置为True之后便可以触发DoubleClick事件, 进而完成整个过程.   </p>
<p> 定义监听函数</p>
<pre class="java" name="code">
	 	_textArea.addEventListener(MouseEvent.DOUBLE_CLICK, addDataGrid);
</pre>
<p>响应DoubleClick事件</p>
<pre class="java" name="code>
	 /**
	 * 响应双击
	 */
	 private function addDataGrid(e:MouseEvent):void {
	 	_textArea.editable = true;
	 }
</pre>
<p>附带几个TextArea的属性:<br />
textArea.editable = false;  是否可以编辑, 默认为True<br />
textArea.doubleClickEnabled = true; 是否接受双击 默认为false<br />
textArea.selectable = false; 内部文字是否可以被选定 默认为ture;</p>
<p><p>

----------Post from: <a href="http://liguoliang.com">@LiGuoliang.com, 欢迎回来~</a>----------</p></p>
]]></content:encoded>
			<wfw:commentRss>http://liguoliang.com/2008/%e7%9b%91%e5%90%acflex%e4%b8%adtextarea%e7%9a%84doubleclick-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

