<?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>Kalen Gibbons &#187; scrollbars</title>
	<atom:link href="http://www.kalengibbons.com/blog/index.php/tag/scrollbars/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kalengibbons.com/blog</link>
	<description>The Dead Tree Blog</description>
	<lastBuildDate>Wed, 10 Mar 2010 07:28:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to determine if a DataGrid or List has ScrollBars</title>
		<link>http://www.kalengibbons.com/blog/index.php/2008/10/how-to-determine-if-a-datagrid-or-list-has-scrollbars/</link>
		<comments>http://www.kalengibbons.com/blog/index.php/2008/10/how-to-determine-if-a-datagrid-or-list-has-scrollbars/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 20:14:02 +0000</pubDate>
		<dc:creator>Kalen Gibbons</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[maxVerticalScrollPosition]]></category>
		<category><![CDATA[scrollbars]]></category>

		<guid isPermaLink="false">http://www.kalengibbons.com/blog2/?p=42</guid>
		<description><![CDATA[There are occasions when you need to programmatically determine if a List or DataGrid has enough rows to require ScrollBars. If your DataGrid, for example, does not have an explicit rowCount or height specified, then it&#8217;s not as easy as looking at its data provider. The easiest way I&#8217;ve found it to use the &#8220;maxVerticalScrollPosition&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>There are occasions when you need to programmatically determine if a List or DataGrid has enough rows to require ScrollBars.  If your DataGrid, for example, does not have an explicit rowCount or height specified, then it&#8217;s not as easy as looking at its data provider.</p>
<p>The easiest way I&#8217;ve found it to use the &#8220;maxVerticalScrollPosition&#8221; property, which the <a href="http://livedocs.adobe.com/flex/3/langref/mx/core/ScrollControlBase.html#maxVerticalScrollPosition" target="_blank">Flex 3 Language Reference</a> describes as:</p>
<p><span style="font-style: italic">&#8220;The maximum value for the verticalScrollPosition property. Note that this is not the height of the content because the maxVerticalScrollPosition property contains the height of the content minus the height of the displayable area.&#8221;</span></p>
<p>
So if the the maxVerticalScrollPosition is greater than zero, then scrollbars must be available.</p>
<div class="code"><span class="asReserved">if</span>(myDataGrid.maxVerticalScrollPosition &gt; 0){<br />
    <span class="asComment indent">// is scrollable</span><br />
}<span class="asReserved">else</span>{<br />
<span class="asComment indent">// not scrollable</span><br />
}</div>
<p>
If anybody know of an easier or more efficient way of determine if a List has ScrollBars, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalengibbons.com/blog/index.php/2008/10/how-to-determine-if-a-datagrid-or-list-has-scrollbars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
