<?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/"
		>
<channel>
	<title>Comments on: Programmatically scrolling a TextArea control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Fri, 19 Mar 2010 20:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kristian</title>
		<link>http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/comment-page-1/#comment-3738</link>
		<dc:creator>Kristian</dc:creator>
		<pubDate>Tue, 28 Oct 2008 09:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/#comment-3738</guid>
		<description>Thanks Peter.

I thought as much - just checking if there was something I was missing...

Cheers,
K.

PS Thanks for re-formatting my comment - I&#039;ll try and not be so lazy next time! ;-)</description>
		<content:encoded><![CDATA[<p>Thanks Peter.</p>
<p>I thought as much &#8211; just checking if there was something I was missing&#8230;</p>
<p>Cheers,<br />
K.</p>
<p>PS Thanks for re-formatting my comment &#8211; I&#8217;ll try and not be so lazy next time! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/comment-page-1/#comment-3739</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Mon, 27 Oct 2008 15:46:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/#comment-3739</guid>
		<description>Kristian,

I think &quot;extend the class to make &lt;code&gt;verticalScrollBar&lt;/code&gt; public&quot; is probably your best bet.

Peter</description>
		<content:encoded><![CDATA[<p>Kristian,</p>
<p>I think &#8220;extend the class to make <code>verticalScrollBar</code> public&#8221; is probably your best bet.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kristian</title>
		<link>http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/comment-page-1/#comment-3737</link>
		<dc:creator>Kristian</dc:creator>
		<pubDate>Mon, 27 Oct 2008 13:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/26/programmatically-scrolling-a-textarea-control-in-flex/#comment-3737</guid>
		<description>Hi again Peter!

A question regarding the scroll bar - is there a way to reference this at all?  I see in the docs that the &lt;code&gt;verticalScrollBar&lt;/code&gt; is protected...

I have a chat application that sets:
&lt;pre class=&quot;code&quot;&gt;
textArea.verticalScrollPosition = textArea.maxVerticalScrollPosition;
&lt;/pre&gt;

after a user sends input to the chat, and this works great to force the scrolling down and therefore display the new line in the textArea.  But if a person is scrolling through the text that is already there, and someone else sends something to the textArea, it snaps to the bottom of the chat (as expected) and therefore the scrolling user has lost where they were scrolling to.

I want to add a eventListeners of mouseDown &amp; mouseUp on the scroll bar, then set a boolean value if the mouse is being held down on the scroll bar or not - if it is, I know not to set the verticalScrollPosition of the textArea as the user is using the scroll bar at that moment.

But &lt;code&gt;textArea.verticalScrollBar.addEventListener(...)&lt;/code&gt; does not work with the error:
&lt;blockquote&gt;
Attempted access of inaccessible property verticalScrollBar through a reference with static type mx.controls:TextArea.
&lt;/blockquote&gt;

I&#039;ve tried using &lt;code&gt;textArea.addEventListener(ScrollEvent.SCROLL, scrollHandler)&lt;/code&gt; but this fires repeatedly while scrolling.  I could set the boolean to be true when this event fires, but then I have no way of knowing when to set it back to false.

So, is there any way of doing this as the textArea control stands at the moment, or should I just stop complaining and extend the class to make verticalScrollBar public?  ;-)

Cheers,
K.</description>
		<content:encoded><![CDATA[<p>Hi again Peter!</p>
<p>A question regarding the scroll bar &#8211; is there a way to reference this at all?  I see in the docs that the <code>verticalScrollBar</code> is protected&#8230;</p>
<p>I have a chat application that sets:</p>
<pre class="code">
textArea.verticalScrollPosition = textArea.maxVerticalScrollPosition;
</pre>
<p>after a user sends input to the chat, and this works great to force the scrolling down and therefore display the new line in the textArea.  But if a person is scrolling through the text that is already there, and someone else sends something to the textArea, it snaps to the bottom of the chat (as expected) and therefore the scrolling user has lost where they were scrolling to.</p>
<p>I want to add a eventListeners of mouseDown &amp; mouseUp on the scroll bar, then set a boolean value if the mouse is being held down on the scroll bar or not &#8211; if it is, I know not to set the verticalScrollPosition of the textArea as the user is using the scroll bar at that moment.</p>
<p>But <code>textArea.verticalScrollBar.addEventListener(...)</code> does not work with the error:</p>
<blockquote><p>
Attempted access of inaccessible property verticalScrollBar through a reference with static type mx.controls:TextArea.
</p></blockquote>
<p>I&#8217;ve tried using <code>textArea.addEventListener(ScrollEvent.SCROLL, scrollHandler)</code> but this fires repeatedly while scrolling.  I could set the boolean to be true when this event fires, but then I have no way of knowing when to set it back to false.</p>
<p>So, is there any way of doing this as the textArea control stands at the moment, or should I just stop complaining and extend the class to make verticalScrollBar public?  ;-)</p>
<p>Cheers,<br />
K.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
