<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Resizing a Flex List control using the rowCount property</title>
	<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Tue, 06 Jan 2009 12:20:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Jules</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17459</link>
		<author>Jules</author>
		<pubDate>Wed, 24 Dec 2008 10:49:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17459</guid>
		<description>Thanks for your help Peter, I'll checkout this link. As a workaround, I 've set the rowCount property to 1, when the dataProvider becomes empty.</description>
		<content:encoded><![CDATA[<p>Thanks for your help Peter, I&#8217;ll checkout this link. As a workaround, I &#8216;ve set the rowCount property to 1, when the dataProvider becomes empty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17412</link>
		<author>Peter deHaan</author>
		<pubDate>Fri, 19 Dec 2008 18:45:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17412</guid>
		<description>Jules,

I believe that is a known issue (or it works like that on purpose, where setting the row count to 0 would revert to a default List size rather than make the List disappear).
You can search the public Flex bug base at http://bugs.adobe.com/flex/

Peter</description>
		<content:encoded><![CDATA[<p>Jules,</p>
<p>I believe that is a known issue (or it works like that on purpose, where setting the row count to 0 would revert to a default List size rather than make the List disappear).<br />
You can search the public Flex bug base at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a></p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jules</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17410</link>
		<author>Jules</author>
		<pubDate>Fri, 19 Dec 2008 16:27:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-17410</guid>
		<description>Hi !

Does someone has tested to set the rowCount property to 0 ? When I try, the List takes a very big size !
Does somebody experienced the same problem ?</description>
		<content:encoded><![CDATA[<p>Hi !</p>
<p>Does someone has tested to set the rowCount property to 0 ? When I try, the List takes a very big size !<br />
Does somebody experienced the same problem ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Holger</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-9315</link>
		<author>Holger</author>
		<pubDate>Mon, 31 Mar 2008 20:36:50 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-9315</guid>
		<description>This works nice when all fields have the same size, as soon as each field in the list has a different size Flex doesn't understand it anymore. 
Easy example is to use the posted code and add wordWrap="true" variableRowHeight="true" to the list element.

Now it uses the height of the single line fields, and goes awry as soon as one field is bigger then just one line. Sadly Flex doesn't calculate the height of each field in the list.

If anyone knows a solution for this I would appreciate it allot since it has been bugging me alot lately.</description>
		<content:encoded><![CDATA[<p>This works nice when all fields have the same size, as soon as each field in the list has a different size Flex doesn&#8217;t understand it anymore.<br />
Easy example is to use the posted code and add wordWrap=&#8221;true&#8221; variableRowHeight=&#8221;true&#8221; to the list element.</p>
<p>Now it uses the height of the single line fields, and goes awry as soon as one field is bigger then just one line. Sadly Flex doesn&#8217;t calculate the height of each field in the list.</p>
<p>If anyone knows a solution for this I would appreciate it allot since it has been bugging me alot lately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3719</link>
		<author>peterd</author>
		<pubDate>Mon, 29 Oct 2007 17:23:25 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3719</guid>
		<description>Dan,

It would also be very specific to the skin used on the scroll bar as well. I'm sure you could make your own custom scroll bar skin that would appear at smaller sizes if you wanted. For example, something like the numeric stepper, but without a scroll track/thumb.

Come to think of it, that isn't a half-bad (or half-good, if you prefer) idea! Create a single row List control with NumericStepper control like up/down buttons. Although at that point it may just be better/easier to just use a ComboBox control, but where is the fun in that?!

Peter</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>It would also be very specific to the skin used on the scroll bar as well. I&#8217;m sure you could make your own custom scroll bar skin that would appear at smaller sizes if you wanted. For example, something like the numeric stepper, but without a scroll track/thumb.</p>
<p>Come to think of it, that isn&#8217;t a half-bad (or half-good, if you prefer) idea! Create a single row List control with NumericStepper control like up/down buttons. Although at that point it may just be better/easier to just use a ComboBox control, but where is the fun in that?!</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Nall</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3717</link>
		<author>Dan Nall</author>
		<pubDate>Mon, 29 Oct 2007 17:06:15 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3717</guid>
		<description>Ayup,  i just tried it out.  I get scroll buttons at rowHeight 32 and the thumb appears at 42.  Seems to be resolution independant as well. 

Thanks again for your site Peter.

Cheers,

Dan</description>
		<content:encoded><![CDATA[<p>Ayup,  i just tried it out.  I get scroll buttons at rowHeight 32 and the thumb appears at 42.  Seems to be resolution independant as well. </p>
<p>Thanks again for your site Peter.</p>
<p>Cheers,</p>
<p>Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3715</link>
		<author>peterd</author>
		<pubDate>Mon, 29 Oct 2007 16:15:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3715</guid>
		<description>Dan,

Ah, thanks for the reminder. I updated the entry below and added a second example. A nice, easy way to resize the List control to match the number of items in the data provider is to set the list's &lt;code&gt;rowCount&lt;/code&gt; property to the same number of items in the data provider.

As for your other question/comment. Yes, if you set the &lt;code&gt;rowCount&lt;/code&gt; to 1, you do lose the scroll bar (at least in this case). I believe this is only because the row height isn't large enough to show both the scroll buttons and scroll thumb (not specificially because the row count is set to 1). For example , if I create a List control, set its row count to 1, and then set the &lt;code&gt;rowHeight&lt;/code&gt; property to 80, it &lt;i&gt;will&lt;/i&gt; show the scroll bars.

Peter</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Ah, thanks for the reminder. I updated the entry below and added a second example. A nice, easy way to resize the List control to match the number of items in the data provider is to set the list&#8217;s <code>rowCount</code> property to the same number of items in the data provider.</p>
<p>As for your other question/comment. Yes, if you set the <code>rowCount</code> to 1, you do lose the scroll bar (at least in this case). I believe this is only because the row height isn&#8217;t large enough to show both the scroll buttons and scroll thumb (not specificially because the row count is set to 1). For example , if I create a List control, set its row count to 1, and then set the <code>rowHeight</code> property to 80, it <i>will</i> show the scroll bars.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Nall</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3714</link>
		<author>Dan Nall</author>
		<pubDate>Mon, 29 Oct 2007 15:46:50 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-3714</guid>
		<description>It's interesting that when you set the row count to 1 you lose the scrollbar.  That's something that could possibly be taken advantage of.  I use the rowCount property when the dataprovider is a SQL lookup.  I'll do a SQL COUNT and use the number to set my comboBox or other list's rowCount if it's less than a maximum rowCount I set in init().

BTW -- thanks for this site.  No pontification, just example after example..  just what I need.  

Cheers,

Dan</description>
		<content:encoded><![CDATA[<p>It&#8217;s interesting that when you set the row count to 1 you lose the scrollbar.  That&#8217;s something that could possibly be taken advantage of.  I use the rowCount property when the dataprovider is a SQL lookup.  I&#8217;ll do a SQL COUNT and use the number to set my comboBox or other list&#8217;s rowCount if it&#8217;s less than a maximum rowCount I set in init().</p>
<p>BTW &#8212; thanks for this site.  No pontification, just example after example..  just what I need.  </p>
<p>Cheers,</p>
<p>Dan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
