<?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: Resizing a Flex List control using the rowCount property</title>
	<atom:link href="http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jonathan Campos</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-7456</link>
		<dc:creator>Jonathan Campos</dc:creator>
		<pubDate>Wed, 07 Apr 2010 22:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-7456</guid>
		<description>Peter,

What if I wanted a mx:List to have more rows than what was in the dataprovider? Such as having 50 rows (and therefore a large scrollbar) even if there are only 10 items. I could add 40 null items (to the 10 real items) but that seems ridiculous. I&#039;d also want to be able to still scroll up and down and get the correct scroll indexes.

Have you done this before?</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>What if I wanted a mx:List to have more rows than what was in the dataprovider? Such as having 50 rows (and therefore a large scrollbar) even if there are only 10 items. I could add 40 null items (to the 10 real items) but that seems ridiculous. I&#8217;d also want to be able to still scroll up and down and get the correct scroll indexes.</p>
<p>Have you done this before?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin B.</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-7131</link>
		<dc:creator>Kevin B.</dc:creator>
		<pubDate>Sat, 27 Feb 2010 13:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-7131</guid>
		<description>I was also struggling with dynamic height of the list control and than found this post: http://www.sdfug.org/san-diego-flash-users-group/flex/flex-list-items-with-dynamic-heights/. When you have a list with items of variable rowheight it&#039;s better not to rely on the rowcount property, but you can change the height of the list using the measureHeightOfItems() method like this:

&lt;pre lang=&quot;mxml&quot;&gt;
&lt;mx:List render=&quot;event.target.height=event.target.measureHeightOfItems()+event.+ target.viewMetrics.top+target.viewMetrics.bottom;&quot; /&gt;
&lt;/pre&gt;

Hope this helps.</description>
		<content:encoded><![CDATA[<p>I was also struggling with dynamic height of the list control and than found this post: <a href="http://www.sdfug.org/san-diego-flash-users-group/flex/flex-list-items-with-dynamic-heights/" rel="nofollow">http://www.sdfug.org/san-diego-flash-users-group/flex/flex-list-items-with-dynamic-heights/</a>. When you have a list with items of variable rowheight it&#8217;s better not to rely on the rowcount property, but you can change the height of the list using the measureHeightOfItems() method like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span> render=<span style="color: #ff0000;">&quot;event.target.height=event.target.measureHeightOfItems()+event.+ target.viewMetrics.top+target.viewMetrics.bottom;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-6724</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Tue, 05 Jan 2010 01:33:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-6724</guid>
		<description>When I put a List inside a HDividedBox, and then I set the widths of the Lists to 100% I find that the horizontal scroll bars fail to appear properly. This also happens when it is nested in another container. Is there a way to do this?

Below is an example of the problem. Try adjusting the divider so that the list is too narrow to fit the text:

&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;horizontal&quot;&gt;

    &lt;mx:Panel title=&quot;HDividedBox Container Example&quot; width=&quot;90%&quot; height=&quot;90%&quot; paddingTop=&quot;10&quot; paddingLeft=&quot;10&quot; paddingRight=&quot;10&quot; paddingBottom=&quot;10&quot;&gt;

        &lt;mx:Text width=&quot;100%&quot; color=&quot;blue&quot; text=&quot;Drag the divider side to side to resize the children.&quot;/&gt;

        &lt;mx:HDividedBox width=&quot;100%&quot; height=&quot;100%&quot;&gt;

            &lt;mx:List&gt;
                &lt;mx:dataProvider&gt;
                    &lt;mx:Array&gt;
                        &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                        &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                        &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                    &lt;/mx:Array&gt;
                &lt;/mx:dataProvider&gt;
            &lt;/mx:List&gt;

            &lt;mx:Canvas label=&quot;Canvas 2&quot; width=&quot;100%&quot; height=&quot;100%&quot; backgroundColor=&quot;#99CCFF&quot;&gt;
                &lt;mx:List x=&quot;0&quot; y=&quot;26&quot; width=&quot;100%&quot;&gt;
                    &lt;mx:dataProvider&gt;
                        &lt;mx:Array&gt;
                            &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                            &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                            &lt;mx:Object label=&quot;A string that is kinda long.&quot; /&gt;
                        &lt;/mx:Array&gt;
                    &lt;/mx:dataProvider&gt;
                &lt;/mx:List&gt;
            &lt;/mx:Canvas&gt;

        &lt;/mx:HDividedBox&gt;

    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>When I put a List inside a HDividedBox, and then I set the widths of the Lists to 100% I find that the horizontal scroll bars fail to appear properly. This also happens when it is nested in another container. Is there a way to do this?</p>
<p>Below is an example of the problem. Try adjusting the divider so that the list is too narrow to fit the text:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Panel</span> title=<span style="color: #ff0000;">&quot;HDividedBox Container Example&quot;</span> width=<span style="color: #ff0000;">&quot;90%&quot;</span> height=<span style="color: #ff0000;">&quot;90%&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;10&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;10&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> color=<span style="color: #ff0000;">&quot;blue&quot;</span> text=<span style="color: #ff0000;">&quot;Drag the divider side to side to resize the children.&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HDividedBox</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Canvas</span> label=<span style="color: #ff0000;">&quot;Canvas 2&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> backgroundColor=<span style="color: #ff0000;">&quot;#99CCFF&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span> x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;26&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
                            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;A string that is kinda long.&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Canvas</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:HDividedBox</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Panel</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Jody LeBlanc</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-4629</link>
		<dc:creator>Jody LeBlanc</dc:creator>
		<pubDate>Mon, 20 Jul 2009 02:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-4629</guid>
		<description>Hi Chris,

The list component lists items from a Data Provider - it doesn&#039;t restrict or validate the data provider, just enumerate the children of that provider.  You&#039;d need to programmaticly limit it -
if (dataProvider.length &gt; 3) return;</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>The list component lists items from a Data Provider &#8211; it doesn&#8217;t restrict or validate the data provider, just enumerate the children of that provider.  You&#8217;d need to programmaticly limit it -<br />
if (dataProvider.length &gt; 3) return;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-1692</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 16 Apr 2009 08:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1692</guid>
		<description>does somebody know how to put a maximum limit to a list ?
I want to do a list where you can only put 3 elements, not more, but I don&#039;t find
any properties in the documentation of the class to do so...</description>
		<content:encoded><![CDATA[<p>does somebody know how to put a maximum limit to a list ?<br />
I want to do a list where you can only put 3 elements, not more, but I don&#8217;t find<br />
any properties in the documentation of the class to do so&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JSM</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-1698</link>
		<dc:creator>JSM</dc:creator>
		<pubDate>Tue, 10 Mar 2009 19:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1698</guid>
		<description>I, too, have the problem of rowCount not working with rows of varying heights. PLEASE -- any work-around?</description>
		<content:encoded><![CDATA[<p>I, too, have the problem of rowCount not working with rows of varying heights. PLEASE &#8212; any work-around?</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-page-1/#comment-1695</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 21 Jan 2009 07:13:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1695</guid>
		<description>flexer,

Can you please file a bug in the Flex bug base at http://bugs.adobe.com/flex/ and post the bug number here so a few of us can vote/subscribe.

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>flexer,</p>
<p>Can you please file a bug in the Flex bug base at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> and post the bug number here so a few of us can vote/subscribe.</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flexer</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-1697</link>
		<dc:creator>flexer</dc:creator>
		<pubDate>Tue, 20 Jan 2009 06:42:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1697</guid>
		<description>has anyone noticed that when adding a list to a popupmanager or changing display containers the rows get larger even though they read out as the same height?

for whatever reason setting rowHeight again after its been reparented fixes.</description>
		<content:encoded><![CDATA[<p>has anyone noticed that when adding a list to a popupmanager or changing display containers the rows get larger even though they read out as the same height?</p>
<p>for whatever reason setting rowHeight again after its been reparented fixes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scheich</title>
		<link>http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/comment-page-1/#comment-1699</link>
		<dc:creator>Scheich</dc:creator>
		<pubDate>Tue, 06 Jan 2009 16:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1699</guid>
		<description>I have the same problem Hilger describes. Resizing a list with variable row heights does not work. Flex seems to resize the list only with (height of the first entry)*rowCount.

Is there a workaround for this?</description>
		<content:encoded><![CDATA[<p>I have the same problem Hilger describes. Resizing a list with variable row heights does not work. Flex seems to resize the list only with (height of the first entry)*rowCount.</p>
<p>Is there a workaround for this?</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-page-1/#comment-1696</link>
		<dc:creator>Jules</dc:creator>
		<pubDate>Wed, 24 Dec 2008 10:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/28/resizing-a-flex-list-control-using-the-rowcount-property/#comment-1696</guid>
		<description>Thanks for your help Peter, I&#039;ll checkout this link. As a workaround, I &#039;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>
</channel>
</rss>

