<?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>Flex Examples &#187; DropDownList (Spark)</title>
	<atom:link href="http://blog.flexexamples.com/category/spark/dropdownlist-spark/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Toggling the drop shadow on the Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 00:07:18 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[dropShadowVisible]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=3180</guid>
		<description><![CDATA[<p>The following example shows how you can toggle the drop shadow on the Spark DropDownList control in Flex 4 by setting the Boolean dropShadowVisible style.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_dropShadowVisible_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:controlBarContent&#62; &#60;s:CheckBox id=&#34;cb&#34; label=&#34;dropShadowVisible&#34; selected=&#34;true&#34; change=&#34;cb_changeHandler(event);&#34; /&#62; &#60;/s:controlBarContent&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; protected function cb_changeHandler&#40;evt:Event&#41;:void &#123; ddl.openDropDown&#40;&#41;; &#125; &#93;&#93;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle the drop shadow on the Spark DropDownList control in Flex 4 by setting the Boolean <code>dropShadowVisible</code> style.</p>
<p><span id="more-3180"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_dropShadowVisible_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&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:CheckBox</span> id=<span style="color: #ff0000;">&quot;cb&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;dropShadowVisible&quot;</span></span>
<span style="color: #000000;">                selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;cb_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 cb_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.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;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            dropShadowVisible=<span style="color: #ff0000;">&quot;{cb.selected}&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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,Ten]&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 class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_dropShadowVisible_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_dropShadowVisible_test/main.html" width="100%" height="300"></iframe></p>
<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p>You can also set the <code>dropShadowVisible</code> style in an external .CSS file or &gt;Style&gt; block, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_dropShadowVisible_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
&nbsp;
        s|DropDownList {
            dropShadowVisible: false;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</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;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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,Ten]&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>Or you can set the <code>dropShadowVisible</code> style using ActionScript, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_dropShadowVisible_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&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:CheckBox</span> id=<span style="color: #ff0000;">&quot;cb&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;dropShadowVisible&quot;</span></span>
<span style="color: #000000;">                selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;cb_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 cb_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.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;dropShadowVisible&quot;</span>, cb.selected<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;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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,Ten]&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 class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling the drop shadow on the Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/',contentID: 'post-3180',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dropShadowVisible,Gumbo',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/06/21/toggling-the-drop-shadow-on-the-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the text roll over color on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Thu, 13 May 2010 23:52:02 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[itemRenderer]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=3109</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/14/setting-the-text-roll-over-color-on-a-combobox-control-in-flex/">&#8220;Setting the text roll over color on a ComboBox control in Flex&#8221;</a>, we saw how you could change the text roll over color for a Flex MX ComboBox control by setting the textRollOverColor style.</p> <p>The following example shows how you can change the text roll over color in the Spark [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/14/setting-the-text-roll-over-color-on-a-combobox-control-in-flex/">&#8220;Setting the text roll over color on a ComboBox control in Flex&#8221;</a>, we saw how you could change the text roll over color for a Flex MX ComboBox control by setting the <code>textRollOverColor</code> style.</p>
<p>The following example shows how you can change the text roll over color in the Spark DropDownList control&#8217;s <em>hovered</em> and <em>selected</em> states by creating a custom item renderer and setting the <code>color</code> style.</p>
<p><span id="more-3109"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_itemRenderer_color_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</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;">            itemRenderer=<span style="color: #ff0000;">&quot;skins.CustomSparkItemRenderer&quot;</span></span>
<span style="color: #000000;">            selectionColor=<span style="color: #ff0000;">&quot;black&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            selectedIndex=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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>And the custom item renderer, <em>skins/CustomSparkItemRenderer.mxml</em>, is as follows:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ItemRenderer</span> name=<span style="color: #ff0000;">&quot;CustomSparkItemRenderer&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span> </span>
<span style="color: #000000;">        autoDrawBackground=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;hovered&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;selected&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span></span>
<span style="color: #000000;">            color=<span style="color: #ff0000;">&quot;black&quot;</span></span>
<span style="color: #000000;">            color.hovered=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            color.selected=<span style="color: #ff0000;">&quot;white&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;3&quot;</span> right=<span style="color: #ff0000;">&quot;3&quot;</span> top=<span style="color: #ff0000;">&quot;4&quot;</span> bottom=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ItemRenderer</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_itemRenderer_color_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_itemRenderer_color_test/main.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the text roll over color on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-3109',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Color,Gumbo,itemRenderer',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/05/13/setting-the-text-roll-over-color-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the border color on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 17:09:04 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[borderColor]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2624</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/">&#8220;Setting the border alpha on a Spark DropDownList control in Flex 4&#8243;</a>, we saw how you could set the border alpha on a Spark DropDownList control&#8217;s popup menu in Flex 4 by setting the borderAlpha style.</p> <p>The following example shows how you can set the border color on a Spark [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/">&#8220;Setting the border alpha on a Spark DropDownList control in Flex 4&#8243;</a>, we saw how you could set the border alpha on a Spark DropDownList control&#8217;s popup menu in Flex 4 by setting the <code>borderAlpha</code> style.</p>
<p>The following example shows how you can set the border color on a Spark DropDownList control&#8217;s popup menu in Flex 4 by setting the <code>borderColor</code> style.</p>
<p><span id="more-2624"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_borderColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&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;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;borderColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;clrPckr&quot;</span> change=<span style="color: #ff0000;">&quot;ddl.openDropDown();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</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;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl&quot;</span></span>
<span style="color: #000000;">            borderColor=<span style="color: #ff0000;">&quot;{clrPckr.selectedColor}&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            dropShadowVisible=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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]&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>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_borderColor_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_borderColor_test/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>borderColor</code> style in an external .CSS file or a &lt;Style&gt; block, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_borderColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
        @namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
&nbsp;
        s|DropDownList {
            borderColor: haloOrange;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</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;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            dropShadowVisible=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">            creationComplete=<span style="color: #ff0000;">&quot;ddl.openDropDown();&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]&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>Or you can set the <code>borderColor</code> style using ActionScript, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_borderColor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&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;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;borderColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;clrPckr&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;clrPckr_changeHandler(event);&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</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;">            import mx.events.ColorPickerEvent;</span>
&nbsp;
<span style="color: #000000;">            protected function clrPckr_changeHandler<span style="color: #66cc66;">&#40;</span>evt:ColorPickerEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                ddl.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderColor&quot;</span>, evt.color<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;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            dropShadowVisible=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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]&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 class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the border color on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2624',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderColor,Gumbo',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/20/setting-the-border-color-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the border alpha on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 07:26:09 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[borderAlpha]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2621</guid>
		<description><![CDATA[<p>The following example shows how you can set the border alpha on a Spark DropDownList control&#8217;s popup menu in Flex 4 by setting the borderAlpha style.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_borderAlpha_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:controlBarContent&#62; &#60;s:Label text=&#34;borderAlpha:&#34; /&#62; &#60;s:HSlider id=&#34;sl&#34; minimum=&#34;0.0&#34; maximum=&#34;1.0&#34; value=&#34;1.0&#34; snapInterval=&#34;0.1&#34; stepSize=&#34;0.1&#34; change=&#34;ddl.openDropDown();&#34; /&#62; &#60;/s:controlBarContent&#62; &#160; &#60;s:DropDownList id=&#34;ddl&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the border alpha on a Spark DropDownList control&#8217;s popup menu in Flex 4 by setting the <code>borderAlpha</code> style.</p>
<p><span id="more-2621"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_borderAlpha_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&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:Label</span> text=<span style="color: #ff0000;">&quot;borderAlpha:&quot;</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;0.0&quot;</span> maximum=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                value=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #000000;">                snapInterval=<span style="color: #ff0000;">&quot;0.1&quot;</span> stepSize=<span style="color: #ff0000;">&quot;0.1&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;ddl.openDropDown();&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;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl&quot;</span></span>
<span style="color: #000000;">            borderAlpha=<span style="color: #ff0000;">&quot;{sl.value}&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            dropShadowVisible=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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]&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 class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the border alpha on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2621',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderAlpha,Gumbo',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/20/setting-the-border-alpha-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking that an item is selected in the Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 00:49:23 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[NumberValidator]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[lowerThanMinError]]></category>
		<category><![CDATA[requiresSelection]]></category>
		<category><![CDATA[selectedIndex]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2597</guid>
		<description><![CDATA[<p>The following example shows how you can check whether the user has selected an item in the Spark DropDownList control in Flex 4 by setting the Boolean requiresSelection property to true or using a NumberValidator to check the DropDownList control&#8217;s selectedIndex property is greater than -1.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_requiresSelection_test&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can check whether the user has selected an item in the Spark DropDownList control in Flex 4 by setting the Boolean <code>requiresSelection</code> property to <em>true</em> or using a NumberValidator to check the DropDownList control&#8217;s <code>selectedIndex</code> property is greater than -1.</p>
<p><span id="more-2597"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_requiresSelection_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span> 
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</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> prompt=<span style="color: #ff0000;">&quot;Please select an item&quot;</span> requireSelection=<span style="color: #ff0000;">&quot;true&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]&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 class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/main.html" width="100%" height="300"></iframe></p>
<p>Or you can use a NumberValidator on the Spark DropDownList control to check that the <code>selectedIndex</code> property is greater than or equal to 0, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_selectedIndex_NumberValidator_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span> 
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</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;">            import mx.controls.Alert;</span>
<span style="color: #000000;">            import mx.events.ValidationResultEvent;</span>
&nbsp;
<span style="color: #000000;">            protected function button1_clickHandler<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                numValidator.validate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function numValidator_validHandler<span style="color: #66cc66;">&#40;</span>evt:ValidationResultEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                Alert.show<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DropDownList item selected: &quot;</span> + ddl.selectedItem.toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, evt.type<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function numValidator_invalidHandler<span style="color: #66cc66;">&#40;</span>evt:ValidationResultEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                Alert.show<span style="color: #66cc66;">&#40;</span>ddl.prompt, evt.type<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;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:NumberValidator</span> id=<span style="color: #ff0000;">&quot;numValidator&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{ddl}&quot;</span></span>
<span style="color: #000000;">                property=<span style="color: #ff0000;">&quot;selectedIndex&quot;</span></span>
<span style="color: #000000;">                minValue=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                lowerThanMinError=<span style="color: #ff0000;">&quot;{ddl.prompt}&quot;</span></span>
<span style="color: #000000;">                valid=<span style="color: #ff0000;">&quot;numValidator_validHandler(event);&quot;</span></span>
<span style="color: #000000;">                invalid=<span style="color: #ff0000;">&quot;numValidator_invalidHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</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> prompt=<span style="color: #ff0000;">&quot;Please select an item&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]&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:Button</span> label=<span style="color: #ff0000;">&quot;validate&quot;</span> click=<span style="color: #ff0000;">&quot;button1_clickHandler(event);&quot;</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 class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/main2.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Checking that an item is selected in the Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2597',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,lowerThanMinError,requiresSelection,selectedIndex',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Displaying all items in a Spark DropDownList control drop down menu in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 20:20:33 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[skinClass]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2471</guid>
		<description><![CDATA[<p>The following example shows how you can display all items in a Spark DropDownList control&#8217;s drop down menu in Flex 4 by creating a custom DropDownList skin and removing the Scroller skin part.</p> <p></p> <p class="note">Thanks to Andriy Panas for the no Scroller suggestion in <a href="http://bugs.adobe.com/jira/browse/SDK-22614">http://bugs.adobe.com/jira/browse/SDK-22614</a>.</p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_noScroller_test&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display all items in a Spark DropDownList control&#8217;s drop down menu in Flex 4 by creating a custom DropDownList skin and removing the Scroller skin part.</p>
<p><span id="more-2471"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>
<p class="note">Thanks to Andriy Panas for the no Scroller suggestion in <a href="http://bugs.adobe.com/jira/browse/SDK-22614">http://bugs.adobe.com/jira/browse/SDK-22614</a>.</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_noScroller_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        creationComplete=<span style="color: #ff0000;">&quot;numSteppr_changeHandler(event);&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> paddingLeft=<span style="color: #ff0000;">&quot;20&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">                paddingTop=<span style="color: #ff0000;">&quot;20&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</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;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Number of items:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:NumericStepper</span> id=<span style="color: #ff0000;">&quot;numSteppr&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;1&quot;</span> maximum=<span style="color: #ff0000;">&quot;12&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;numSteppr_changeHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</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;">            import mx.collections.ArrayList;</span>
<span style="color: #000000;">            import skins.CustomDropDownListSkin;</span>
&nbsp;
<span style="color: #000000;">            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            protected var arrList:ArrayList = new ArrayList<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">            protected function numSteppr_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;">                var arr:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">                var idx:uint;</span>
<span style="color: #000000;">                var len:uint = numSteppr.value;</span>
<span style="color: #000000;">                for <span style="color: #66cc66;">&#40;</span>idx=<span style="color: #cc66cc;">0</span>; idx&lt;len; idx++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    arr.push<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>label:<span style="color: #ff0000;">&quot;Item &quot;</span> + idx<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                arrList.source = arr;</span>
&nbsp;
<span style="color: #000000;">                ddl1.openDropDown<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                ddl2.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:HGroup</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Default skin:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl1&quot;</span></span>
<span style="color: #000000;">                dataProvider=<span style="color: #ff0000;">&quot;{arrList}&quot;</span></span>
<span style="color: #000000;">                requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Custom skin:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl2&quot;</span></span>
<span style="color: #000000;">                dataProvider=<span style="color: #ff0000;">&quot;{arrList}&quot;</span></span>
<span style="color: #000000;">                requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                skinClass=<span style="color: #ff0000;">&quot;skins.CustomDropDownListSkin&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:HGroup</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>The custom Spark DropDownList control skin, <em>skins/CustomDropDownListSkin.mxml</em>, is as follows:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SparkSkin</span> name=<span style="color: #ff0000;">&quot;CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:fb=<span style="color: #ff0000;">&quot;http://ns.adobe.com/flashbuilder/2009&quot;</span></span>
<span style="color: #000000;">        alpha.disabled=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- states --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;open&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- host component --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Metadata</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;">            <span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.DropDownList&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</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:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span> fb:purpose=<span style="color: #ff0000;">&quot;styling&quot;</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;">            /* Define the content fill items that should be colored by the <span style="color: #ff0000;">&quot;contentBackgroundColor&quot;</span> style. */</span>
<span style="color: #000000;">            static private const contentFill:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;bgFill&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">            override public function get contentItems<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Array <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                return contentFill</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            override protected function updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth:Number, unscaledHeight:Number<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderVisible&quot;</span><span style="color: #66cc66;">&#41;</span> == false<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>border<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        border.visible = false;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>background<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span> else <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>border<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        border.visible = true;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>background<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">1</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>dropShadow<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    dropShadow.visible = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;dropShadowVisible&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                openButton.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span>, getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>borderStroke<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    borderStroke.color = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderColor&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                    borderStroke.alpha = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderAlpha&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                super.updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth, unscaledHeight<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: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">    The PopUpAnchor control that opens the drop-down list.</span>
&nbsp;
<span style="color: #000000;">    &lt;p&gt;</span></span>In a custom skin class that uses transitions, set the
    <span style="color: #000000;">&lt;code<span style="color: #7400FF;">&gt;</span></span>itemDestructionPolicy<span style="color: #000000;">&lt;/code<span style="color: #7400FF;">&gt;</span></span> property to <span style="color: #000000;">&lt;code<span style="color: #7400FF;">&gt;</span></span>none<span style="color: #000000;">&lt;/code<span style="color: #7400FF;">&gt;</span></span>.<span style="color: #000000;">&lt;/p<span style="color: #7400FF;">&gt;</span></span>
    --&gt;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;popUp&quot;</span> displayPopUp.normal=<span style="color: #ff0000;">&quot;false&quot;</span> displayPopUp.open=<span style="color: #ff0000;">&quot;true&quot;</span> includeIn=<span style="color: #ff0000;">&quot;open&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> itemDestructionPolicy=<span style="color: #ff0000;">&quot;auto&quot;</span></span>
<span style="color: #000000;">            popUpPosition=<span style="color: #ff0000;">&quot;below&quot;</span> popUpWidthMatchesAnchorWidth=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- This includes borders, background colors, scrollers, and filters. --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> id=<span style="color: #ff0000;">&quot;dropDown&quot;</span> minHeight=<span style="color: #ff0000;">&quot;22&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:RectangularDropShadow</span> id=<span style="color: #ff0000;">&quot;dropShadow&quot;</span> blurX=<span style="color: #ff0000;">&quot;20&quot;</span> blurY=<span style="color: #ff0000;">&quot;20&quot;</span> alpha=<span style="color: #ff0000;">&quot;0.45&quot;</span> distance=<span style="color: #ff0000;">&quot;7&quot;</span></span>
<span style="color: #000000;">                    angle=<span style="color: #ff0000;">&quot;90&quot;</span> color=<span style="color: #ff0000;">&quot;#000000&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;border&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- border stroke --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColorStroke</span> id=<span style="color: #ff0000;">&quot;borderStroke&quot;</span> weight=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- fill --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- Defines the appearance of drop-down list's background fill. --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;background&quot;</span> left=<span style="color: #ff0000;">&quot;1&quot;</span> right=<span style="color: #ff0000;">&quot;1&quot;</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">                    The color of the drop down's background fill.</span>
<span style="color: #000000;">                    The default color is 0xFFFFFF.</span>
<span style="color: #000000;">                    --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;bgFill&quot;</span> color=<span style="color: #ff0000;">&quot;0xFFFFFF&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DataGroup</span> id=<span style="color: #ff0000;">&quot;dataGroup&quot;</span> itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultItemRenderer&quot;</span> left=<span style="color: #ff0000;">&quot;1&quot;</span> right=<span style="color: #ff0000;">&quot;1&quot;</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> gap=<span style="color: #ff0000;">&quot;0&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;contentJustify&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DataGroup</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---  The default skin is DropDownListButtonSkin. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;openButton&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;spark.skins.spark.DropDownListButtonSkin&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> maxDisplayedLines=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            mouseEnabled=<span style="color: #ff0000;">&quot;false&quot;</span> mouseChildren=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;7&quot;</span> right=<span style="color: #ff0000;">&quot;30&quot;</span> top=<span style="color: #ff0000;">&quot;2&quot;</span> bottom=<span style="color: #ff0000;">&quot;2&quot;</span> width=<span style="color: #ff0000;">&quot;75&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:SparkSkin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_noScroller_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_noScroller_test/main.html" width="100%" height="500"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying all items in a Spark DropDownList control drop down menu in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/',contentID: 'post-2471',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,skinClass',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/10/displaying-all-items-in-a-spark-dropdownlist-control-drop-down-menu-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the horizontal scroll policy on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 16:39:27 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[horizontalScrollPolicy]]></category>
		<category><![CDATA[scroller]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2410</guid>
		<description><![CDATA[<p>The following example shows how you can set the horizontal scroll policy on a Spark DropDownList control in Flex 4 by setting the horizontalScrollPolicy style on the drop down menu&#8217;s Scroller skin part.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_scroller_horizontalScrollPolicy_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; import mx.core.ScrollPolicy; &#93;&#93;&#62; &#60;/fx:Script&#62; &#160; &#60;s:DropDownList id=&#34;ddl&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the horizontal scroll policy on a Spark DropDownList control in Flex 4 by setting the <code>horizontalScrollPolicy</code> style on the drop down menu&#8217;s Scroller skin part.</p>
<p><span id="more-2410"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_scroller_horizontalScrollPolicy_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</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;">            import mx.core.ScrollPolicy;</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;">            width=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">            open=<span style="color: #ff0000;">&quot;ddl.scroller.setStyle('horizontalScrollPolicy', ScrollPolicy.OFF);&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;[Accordion,ApplicationControlBar,Alert,Box,Button,ButtonBar,Canvas,ColorPicker]&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>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_scroller_horizontalScrollPolicy_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_scroller_horizontalScrollPolicy_test/main.html" width="100%" height="200"></iframe></p>
<p>Or you can set the <code>horizontalScrollPolicy</code> style in an external .CSS file or &lt;Style/&gt; block, as seen in the following example:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_scroller_horizontalScrollPolicy_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
&nbsp;
        s|Group#dropDown #scroller {
            horizontalScrollPolicy: off;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</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;">            width=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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;[Accordion,ApplicationControlBar,Alert,Box,Button,ButtonBar,Canvas,ColorPicker]&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 class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the horizontal scroll policy on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2410',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,horizontalScrollPolicy,scroller',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/06/setting-the-horizontal-scroll-policy-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting a roll over open delay on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 02:50:15 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[rollOverOpenDelay]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2379</guid>
		<description><![CDATA[<p>The following example shows how you can set a roll over open delay on a Spark DropDownList control in Flex 4 by extending the DropDownList control, accessing the protected DropDownController object and setting the rollOverOpenDelay property.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_dropDownController_rollOverOpenDelay_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34; xmlns:local=&#34;*&#34;&#62; &#60;s:layout&#62; &#60;s:VerticalLayout horizontalAlign=&#34;center&#34; paddingTop=&#34;20&#34; /&#62; &#60;/s:layout&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set a roll over open delay on a Spark DropDownList control in Flex 4 by extending the DropDownList control, accessing the protected DropDownController object and setting the <code>rollOverOpenDelay</code> property.</p>
<p><span id="more-2379"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_dropDownController_rollOverOpenDelay_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        xmlns:local=<span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</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;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;rollOverOpenDelay:&quot;</span> direction=<span style="color: #ff0000;">&quot;horizontal&quot;</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> maximum=<span style="color: #ff0000;">&quot;1500&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;init();&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;{sl.value} ms&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</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;">            import spark.components.supportClasses.DropDownController;</span>
&nbsp;
<span style="color: #000000;">            private function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                var con:DropDownController = dropper.controller;</span>
<span style="color: #000000;">                con.rollOverOpenDelay = sl.value;</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;local:MyDropDownList</span> id=<span style="color: #ff0000;">&quot;dropper&quot;</span></span>
<span style="color: #000000;">            prompt=<span style="color: #ff0000;">&quot;Roll over to open...&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">            creationComplete=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;local: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;[Red,Orange,Yellow,Green,Blue,Purple]&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/local:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/local:MyDropDownList</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>And the custom DropDownList, <em>MyDropDownList.as</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/** http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/ */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>DropDownList<span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>supportClasses<span style="color: #000066; font-weight: bold;">.</span>DropDownController<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MyDropDownList <span style="color: #0033ff; font-weight: bold;">extends</span> DropDownList <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MyDropDownList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> controller<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>DropDownController <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>dropDownController<span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> controller<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span>DropDownController<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>dropDownController = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_dropDownController_rollOverOpenDelay_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_dropDownController_rollOverOpenDelay_test/main.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a roll over open delay on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2379',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,rollOverOpenDelay',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/03/setting-a-roll-over-open-delay-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating three related Spark DropDownList controls in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/01/28/creating-three-related-spark-dropdownlist-controls-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/01/28/creating-three-related-spark-dropdownlist-controls-in-flex-4/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 20:58:24 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[dataProvider]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[selectedItem]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2348</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/">&#8220;Creating two related ComboBoxes&#8221;</a>, we saw how you could create two or three related MX ComboBox controls in Flex 3 by binding to the previous ComboBox control&#8217;s selected item.</p> <p>The following example shows how you can create three related Spark DropDownList controls in Flex 4 by using databinding and XML.</p> [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/">&#8220;Creating two related ComboBoxes&#8221;</a>, we saw how you could create two or three related MX ComboBox controls in Flex 3 by binding to the previous ComboBox control&#8217;s selected item.</p>
<p>The following example shows how you can create three related Spark DropDownList controls in Flex 4 by using databinding and XML.</p>
<p><span id="more-2348"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/01/28/creating-three-related-spark-dropdownlist-controls-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_related_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:XMLListCollection</span> id=<span style="color: #ff0000;">&quot;dp&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:XMLList</span> xmlns=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;">&lt;country label=<span style="color: #ff0000;">&quot;USA&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;">&lt;state label=<span style="color: #ff0000;">&quot;Alaska&quot;</span> city=<span style="color: #ff0000;">&quot;AK&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Anchorage&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Fairbanks&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Juneau&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;">&lt;/state<span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;">&lt;state label=<span style="color: #ff0000;">&quot;California&quot;</span> abbr=<span style="color: #ff0000;">&quot;CA&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;San Francisco&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Oakland&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Los Angeles&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Palm Springs&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Sacramento&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;">&lt;/state<span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;">&lt;state label=<span style="color: #ff0000;">&quot;Nevada&quot;</span> abbr=<span style="color: #ff0000;">&quot;NV&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Las Vegas&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Reno&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Carson City&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;">&lt;/state<span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;">&lt;/country<span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;">&lt;country label=<span style="color: #ff0000;">&quot;Canada&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;">&lt;province label=<span style="color: #ff0000;">&quot;British Columbia&quot;</span>  abbr=<span style="color: #ff0000;">&quot;BC&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Vancouver&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Victoria&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;">&lt;/province<span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;">&lt;province label=<span style="color: #ff0000;">&quot;Alberta&quot;</span> abbr=<span style="color: #ff0000;">&quot;AB&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Calgary&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                        <span style="color: #000000;">&lt;city label=<span style="color: #ff0000;">&quot;Edmonton&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;">&lt;/province<span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;">&lt;/country<span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:XMLList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:XMLListCollection</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Country:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;countryDDL&quot;</span></span>
<span style="color: #000000;">                    dataProvider=<span style="color: #ff0000;">&quot;{dp}&quot;</span></span>
<span style="color: #000000;">                    labelField=<span style="color: #ff0000;">&quot;@label&quot;</span></span>
<span style="color: #000000;">                    requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;State:&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;stateDDL&quot;</span></span>
<span style="color: #000000;">                    dataProvider=<span style="color: #ff0000;">&quot;{new XMLListCollection(countryDDL.selectedItem.children())}&quot;</span></span>
<span style="color: #000000;">                    labelField=<span style="color: #ff0000;">&quot;@label&quot;</span></span>
<span style="color: #000000;">                    requireSelection=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;City:&quot;</span> required=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;cityDDL&quot;</span></span>
<span style="color: #000000;">                    dataProvider=<span style="color: #ff0000;">&quot;{new XMLListCollection(stateDDL.selectedItem.children())}&quot;</span></span>
<span style="color: #000000;">                    labelField=<span style="color: #ff0000;">&quot;@label&quot;</span></span>
<span style="color: #000000;">                    requireSelection=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</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>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_related_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_related_test/main.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating three related Spark DropDownList controls in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/01/28/creating-three-related-spark-dropdownlist-controls-in-flex-4/',contentID: 'post-2348',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'children,dataProvider,Gumbo,selectedItem',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/01/28/creating-three-related-spark-dropdownlist-controls-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Setting the width of the dropdown menu on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 19:20:28 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[DropDownListSkin]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[popUpWidthMatchesAnchorWidth]]></category>
		<category><![CDATA[skinClass]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2344</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/02/setting-the-width-of-the-dropdown-menu-on-a-combobox-control-in-flex/">&#8220;Setting the width of the dropdown menu on a ComboBox control in Flex&#8221;</a>, we saw how you could set the width of the dropdown menu on a Flex MX ComboBox control by setting the dropdownWidth property.</p> <p>The following example shows how you can change the width of the Spark DropDownList [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/02/setting-the-width-of-the-dropdown-menu-on-a-combobox-control-in-flex/">&#8220;Setting the width of the dropdown menu on a ComboBox control in Flex&#8221;</a>, we saw how you could set the width of the dropdown menu on a Flex MX ComboBox control by setting the <code>dropdownWidth</code> property.</p>
<p>The following example shows how you can change the width of the Spark DropDownList control&#8217;s pop up menu so the pop up menu width matches the contents rather than the DropDownMenu button control&#8217;s width by setting the Boolean <code>popUpWidthMatchesAnchorWidth</code> property.</p>
<p><span id="more-2344"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_PopUpAnchor_popUpWidthMatchesAnchorWidth_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</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;list&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;name&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;skins.CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&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><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Adobe Illustrator CS5&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Adobe AIR 2.0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;ColdFusion 9&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Dreamweaver CS5&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Flash Professional CS5&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Adobe Flash Player 10.1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Fireworks CS5&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Flex 4.0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Lightroom 2.0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Photoshop CS5&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</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>Then in the custom DropDownList skin you need to set the <code>popUpWidthMatchesAnchorWidth</code> property to <code>false</code>, as seen in the following snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;popUp&quot;</span></span>
<span style="color: #000000;">        displayPopUp.normal=<span style="color: #ff0000;">&quot;false&quot;</span> displayPopUp.open=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">        includeIn=<span style="color: #ff0000;">&quot;open&quot;</span></span>
<span style="color: #000000;">        left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">        itemDestructionPolicy=<span style="color: #ff0000;">&quot;auto&quot;</span></span>
<span style="color: #000000;">        popUpPosition=<span style="color: #ff0000;">&quot;below&quot;</span></span>
<span style="color: #000000;">        popUpWidthMatchesAnchorWidth=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_PopUpAnchor_popUpWidthMatchesAnchorWidth_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_PopUpAnchor_popUpWidthMatchesAnchorWidth_test/main.html" width="100%" height="200"></iframe></p>
<p>The full custom DropDownList skin, <em>skins/CustomDropDownListSkin.mxml</em>, is as follows:</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: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SparkSkin</span> name=<span style="color: #ff0000;">&quot;CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:fb=<span style="color: #ff0000;">&quot;http://ns.adobe.com/flashbuilder/2009&quot;</span></span>
<span style="color: #000000;">        alpha.disabled=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- states --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;open&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- host component --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Metadata</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;">        <span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.DropDownList&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</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:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span> fb:purpose=<span style="color: #ff0000;">&quot;styling&quot;</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;">            import mx.events.FlexEvent;</span>
<span style="color: #000000;">            /* Define the content fill items that should be colored by the <span style="color: #ff0000;">&quot;contentBackgroundColor&quot;</span> style. */</span>
<span style="color: #000000;">            static private const contentFill:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;bgFill&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">            override public function get contentItems<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Array <span style="color: #66cc66;">&#123;</span>return contentFill<span style="color: #66cc66;">&#125;</span>;</span>
&nbsp;
<span style="color: #000000;">            override protected function updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth:Number, unscaledHeight:Number<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderVisible&quot;</span><span style="color: #66cc66;">&#41;</span> == false<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>border<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        border.visible = false;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>background<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>scroller<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        scroller.minViewportInset = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span> else <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>border<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        border.visible = true;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>background<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">1</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                    if <span style="color: #66cc66;">&#40;</span>scroller<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                        scroller.minViewportInset = <span style="color: #cc66cc;">1</span>;</span>
<span style="color: #000000;">                    <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>dropShadow<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    dropShadow.visible = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;dropShadowVisible&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">                openButton.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span>, getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>borderStroke<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    borderStroke.color = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderColor&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                    borderStroke.alpha = getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderAlpha&quot;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                super.updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth, unscaledHeight<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function labelDisplay_updateCompleteHandler<span style="color: #66cc66;">&#40;</span>evt:FlexEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                hostComponent.toolTip = labelDisplay.toolTip;</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: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">    The PopUpAnchor control that opens the drop-down list.</span>
&nbsp;
<span style="color: #000000;">    &lt;p&gt;</span></span>In a custom skin class that uses transitions, set the
    <span style="color: #000000;">&lt;code<span style="color: #7400FF;">&gt;</span></span>itemDestructionPolicy<span style="color: #000000;">&lt;/code<span style="color: #7400FF;">&gt;</span></span> property to <span style="color: #000000;">&lt;code<span style="color: #7400FF;">&gt;</span></span>none<span style="color: #000000;">&lt;/code<span style="color: #7400FF;">&gt;</span></span>.<span style="color: #000000;">&lt;/p<span style="color: #7400FF;">&gt;</span></span>
    --&gt;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;popUp&quot;</span></span>
<span style="color: #000000;">            displayPopUp.normal=<span style="color: #ff0000;">&quot;false&quot;</span> displayPopUp.open=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            includeIn=<span style="color: #ff0000;">&quot;open&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            itemDestructionPolicy=<span style="color: #ff0000;">&quot;auto&quot;</span></span>
<span style="color: #000000;">            popUpPosition=<span style="color: #ff0000;">&quot;below&quot;</span></span>
<span style="color: #000000;">            popUpWidthMatchesAnchorWidth=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">        This includes borders, background colors, scrollers, and filters.</span>
<span style="color: #000000;">        --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> id=<span style="color: #ff0000;">&quot;dropDown&quot;</span> maxHeight=<span style="color: #ff0000;">&quot;134&quot;</span> minHeight=<span style="color: #ff0000;">&quot;22&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:RectangularDropShadow</span> id=<span style="color: #ff0000;">&quot;dropShadow&quot;</span></span>
<span style="color: #000000;">                    blurX=<span style="color: #ff0000;">&quot;20&quot;</span> blurY=<span style="color: #ff0000;">&quot;20&quot;</span></span>
<span style="color: #000000;">                    alpha=<span style="color: #ff0000;">&quot;0.45&quot;</span></span>
<span style="color: #000000;">                    distance=<span style="color: #ff0000;">&quot;7&quot;</span></span>
<span style="color: #000000;">                    angle=<span style="color: #ff0000;">&quot;90&quot;</span></span>
<span style="color: #000000;">                    color=<span style="color: #ff0000;">&quot;#000000&quot;</span></span>
<span style="color: #000000;">                    left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;border&quot;</span></span>
<span style="color: #000000;">                    left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColorStroke</span> id=<span style="color: #ff0000;">&quot;borderStroke&quot;</span> weight=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- fill --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- Defines the appearance of drop-down list's background fill. --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;background&quot;</span></span>
<span style="color: #000000;">                    left=<span style="color: #ff0000;">&quot;1&quot;</span> right=<span style="color: #ff0000;">&quot;1&quot;</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---</span>
<span style="color: #000000;">                    The color of the drop down's background fill.</span>
<span style="color: #000000;">                    The default color is 0xFFFFFF.</span>
<span style="color: #000000;">                    --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;bgFill&quot;</span> color=<span style="color: #ff0000;">&quot;0xFFFFFF&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scroller</span> id=<span style="color: #ff0000;">&quot;scroller&quot;</span></span>
<span style="color: #000000;">                    left=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                    hasFocusableChildren=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    minViewportInset=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DataGroup</span> id=<span style="color: #ff0000;">&quot;dataGroup&quot;</span></span>
<span style="color: #000000;">                        itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultItemRenderer&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> gap=<span style="color: #ff0000;">&quot;0&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;contentJustify&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DataGroup</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Scroller</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!---  The default skin is DropDownListButtonSkin. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;openButton&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;spark.skins.spark.DropDownListButtonSkin&quot;</span></span>
<span style="color: #000000;">            focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span></span>
<span style="color: #000000;">            maxDisplayedLines=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            mouseEnabled=<span style="color: #ff0000;">&quot;false&quot;</span> mouseChildren=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;7&quot;</span> right=<span style="color: #ff0000;">&quot;30&quot;</span> top=<span style="color: #ff0000;">&quot;2&quot;</span> bottom=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;75&quot;</span></span>
<span style="color: #000000;">            verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">            verticalCenter=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            showTruncationTip=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            updateComplete=<span style="color: #ff0000;">&quot;labelDisplay_updateCompleteHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:SparkSkin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the width of the dropdown menu on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2344',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,popUpWidthMatchesAnchorWidth,skinClass',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/01/28/setting-the-width-of-the-dropdown-menu-on-a-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

