<?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: Setting the width of the dropdown menu on a Spark DropDownList control in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/</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: Chris Robinson</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-10345</link>
		<dc:creator>Chris Robinson</dc:creator>
		<pubDate>Tue, 31 Jan 2012 09:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-10345</guid>
		<description>further to this to be able to set the popup (open) state to match both the height and the width of the displayed items the following works nicely

&lt;code&gt;

		&lt;!--- This includes borders, background colors, scrollers, and filters. --&gt;
		
			
			
			
				
					&lt;!--- border stroke --&gt;
					
				
			
			
			&lt;!-- fill --&gt;
			&lt;!--- Defines the appearance of drop-down list&#039;s background fill. --&gt;
			
				
					
					
				
			
			
			
			
				
					
				
				
			
			
		
	
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>further to this to be able to set the popup (open) state to match both the height and the width of the displayed items the following works nicely</p>
<p><code></p>
<p>		<!--- This includes borders, background colors, scrollers, and filters. --></p>
<p>					<!--- border stroke --></p>
<p>			<!-- fill --><br />
			<!--- Defines the appearance of drop-down list's background fill. --></p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vijay</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-10286</link>
		<dc:creator>vijay</dc:creator>
		<pubDate>Mon, 02 Jan 2012 13:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-10286</guid>
		<description>can I have the toolTip on the focusedItem of the dropDownList..?</description>
		<content:encoded><![CDATA[<p>can I have the toolTip on the focusedItem of the dropDownList..?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lordB8r</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-9545</link>
		<dc:creator>lordB8r</dc:creator>
		<pubDate>Mon, 29 Aug 2011 05:09:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-9545</guid>
		<description>@ one1,

I&#039;ve been having the same problems.  I&#039;ve been working through either defining all of the items in the list and getting the widest item and setting the dropdown width to that (which is slow and not optimized), or trying to set the width of the item renderer when the label gets set.  Unfortunately, with the 2nd method I end up getting multi-line labels, and if I try to cancel that by setting the maxLinesToDisplay, the content width gets clipped again :(

Is this a bug?  Peter, have you seen this behaviour before?</description>
		<content:encoded><![CDATA[<p>@ one1,</p>
<p>I&#8217;ve been having the same problems.  I&#8217;ve been working through either defining all of the items in the list and getting the widest item and setting the dropdown width to that (which is slow and not optimized), or trying to set the width of the item renderer when the label gets set.  Unfortunately, with the 2nd method I end up getting multi-line labels, and if I try to cancel that by setting the maxLinesToDisplay, the content width gets clipped again :(</p>
<p>Is this a bug?  Peter, have you seen this behaviour before?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: one1@tutopia.com</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-9345</link>
		<dc:creator>one1@tutopia.com</dc:creator>
		<pubDate>Tue, 28 Jun 2011 16:44:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-9345</guid>
		<description>Hi, when the first item of my dataprovider is very small (3 letters) compared with those of more, the  width of the dropdown dont work, the others items are displayed  to the half 

any suggestions ?</description>
		<content:encoded><![CDATA[<p>Hi, when the first item of my dataprovider is very small (3 letters) compared with those of more, the  width of the dropdown dont work, the others items are displayed  to the half </p>
<p>any suggestions ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-8572</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sun, 28 Nov 2010 17:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-8572</guid>
		<description>@Saariko,

I just tested the code above with Flex Hero (4.5) beta and the code still worked as expected.
Which version of the Flex SDK are you using, and which issues are you seeing?

Peter</description>
		<content:encoded><![CDATA[<p>@Saariko,</p>
<p>I just tested the code above with Flex Hero (4.5) beta and the code still worked as expected.<br />
Which version of the Flex SDK are you using, and which issues are you seeing?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saariko</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-8571</link>
		<dc:creator>Saariko</dc:creator>
		<pubDate>Sun, 28 Nov 2010 17:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-8571</guid>
		<description>i need this code in flash builder 4 with the current sdk. what are the changes needed?
thanx</description>
		<content:encoded><![CDATA[<p>i need this code in flash builder 4 with the current sdk. what are the changes needed?<br />
thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-8444</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 15 Oct 2010 13:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-8444</guid>
		<description>Hi Peter - how would I display a toolTip on the items _in_the_dropDownList? (i.e., not just the selectedItem)

thanks</description>
		<content:encoded><![CDATA[<p>Hi Peter &#8211; how would I display a toolTip on the items _in_the_dropDownList? (i.e., not just the selectedItem)</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-7518</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 17 Apr 2010 21:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-7518</guid>
		<description>@Wannes,

You could try something like this, setting the DropDownList control&#039;s drop down width using the &lt;code&gt;open&lt;/code&gt; event:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;&gt;
    &lt;s:controlBarContent&gt;
        &lt;s:HSlider id=&quot;sl&quot;
                minimum=&quot;100&quot;
                maximum=&quot;300&quot;
                creationComplete=&quot;sl.value = ddl.width;&quot;
                change=&quot;sl_changeHandler(event);&quot; /&gt;
    &lt;/s:controlBarContent&gt;
    
    &lt;fx:Script&gt;
        &lt;![CDATA[
            protected function sl_changeHandler(evt:Event):void {
                ddl.closeDropDown(true);
                ddl.openDropDown();
            }
        ]]&gt;
    &lt;/fx:Script&gt;
    
    &lt;s:DropDownList id=&quot;ddl&quot;
            alternatingItemColors=&quot;[#EEEEEE,#DFDFDF]&quot;
            requireSelection=&quot;true&quot;
            horizontalCenter=&quot;0&quot;
            top=&quot;20&quot;
            open=&quot;ddl.dropDown.width = sl.value;&quot;&gt;
        &lt;s:dataProvider&gt;
            &lt;s:ArrayList source=&quot;[One,Two,Three,Four,Five,Six,Seven,Eight,Nine]&quot; /&gt;
        &lt;/s:dataProvider&gt;
    &lt;/s:DropDownList&gt;
    
&lt;/s:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Wannes,</p>
<p>You could try something like this, setting the DropDownList control&#8217;s drop down width using the <code>open</code> event:</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;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;sl&quot;</span></span>
<span style="color: #000000;">                minimum=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                maximum=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                creationComplete=<span style="color: #ff0000;">&quot;sl.value = ddl.width;&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;sl_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            protected function sl_changeHandler<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                ddl.closeDropDown<span style="color: #66cc66;">&#40;</span>true<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                ddl.openDropDown<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl&quot;</span></span>
<span style="color: #000000;">            alternatingItemColors=<span style="color: #ff0000;">&quot;[#EEEEEE,#DFDFDF]&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            top=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">            open=<span style="color: #ff0000;">&quot;ddl.dropDown.width = sl.value;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span> source=<span style="color: #ff0000;">&quot;[One,Two,Three,Four,Five,Six,Seven,Eight,Nine]&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DropDownList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wannes</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-7516</link>
		<dc:creator>Wannes</dc:creator>
		<pubDate>Sat, 17 Apr 2010 17:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-7516</guid>
		<description>The way I do it now is like they explain in this tutorial: http://tv.adobe.com/watch/flex-in-a-week-day-5/creating-custom-skin-properties/
I hoped for a better solution, but this is the best I can find till now!</description>
		<content:encoded><![CDATA[<p>The way I do it now is like they explain in this tutorial: <a href="http://tv.adobe.com/watch/flex-in-a-week-day-5/creating-custom-skin-properties/" rel="nofollow">http://tv.adobe.com/watch/flex-in-a-week-day-5/creating-custom-skin-properties/</a><br />
I hoped for a better solution, but this is the best I can find till now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wannes</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/comment-page-1/#comment-7505</link>
		<dc:creator>Wannes</dc:creator>
		<pubDate>Thu, 15 Apr 2010 10:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344#comment-7505</guid>
		<description>Thanks for the example, but I have a question:

At this moment I have a custom dropDownSkin for that is used by all my dropdowns. 
Some of the dropdowns I want to give a popup with another width so I changed the width property of the group of the PopUpAnchor to a specific width.
But from now one, all my dropdowns use that width. Can I make this dynamic? For example by adding a style property to the skin that I can use in my mxml components?

Or do I really have to make a skin for each drop down?

Thanks for your time!</description>
		<content:encoded><![CDATA[<p>Thanks for the example, but I have a question:</p>
<p>At this moment I have a custom dropDownSkin for that is used by all my dropdowns.<br />
Some of the dropdowns I want to give a popup with another width so I changed the width property of the group of the PopUpAnchor to a specific width.<br />
But from now one, all my dropdowns use that width. Can I make this dynamic? For example by adding a style property to the skin that I can use in my mxml components?</p>
<p>Or do I really have to make a skin for each drop down?</p>
<p>Thanks for your time!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

