<?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; popUpWidthMatchesAnchorWidth</title>
	<atom:link href="http://blog.flexexamples.com/tag/popupwidthmatchesanchorwidth/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>Creating a simple image gallery using the Spark PopUpAnchor control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 16:05:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[PopUpAnchor (Spark)]]></category>
		<category><![CDATA[displayPopUp]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[popUpWidthMatchesAnchorWidth]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2413</guid>
		<description><![CDATA[<p>The following example shows how you can create a simple image gallery using the Spark PopUpAnchor control in Flex 4 using the PopUpAnchor, BitmapImage, and MX Image controls. </p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_PopUpAnchor_gallery_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;s:HGroup horizontalCenter=&#34;0&#34; top=&#34;20&#34;&#62; &#60;!-- 1 --&#62; &#60;s:Group mouseDown=&#34;fullImg1.displayPopUp = true;&#34;&#62; &#60;!-- embedded thumbnail [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a simple image gallery using the Spark PopUpAnchor control in Flex 4 using the PopUpAnchor, BitmapImage, and MX Image controls. </p>
<p><span id="more-2413"></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/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-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_PopUpAnchor_gallery_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:HGroup</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: #808080; font-style: italic;">&lt;!-- 1 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg1.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- embedded thumbnail image --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg1&quot;</span></span>
<span style="color: #000000;">                    source=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg1&quot;</span></span>
<span style="color: #000000;">                    popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- dynamically loaded full image --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/fx_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                            width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                            mouseUp=<span style="color: #ff0000;">&quot;fullImg1.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</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>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 2 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg2.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg2&quot;</span></span>
<span style="color: #000000;">                    source=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg2&quot;</span></span>
<span style="color: #000000;">                    popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/ai_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                            width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                            mouseUp=<span style="color: #ff0000;">&quot;fullImg2.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</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>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 3 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg3.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg3&quot;</span></span>
<span style="color: #000000;">                           source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg3&quot;</span></span>
<span style="color: #000000;">                           popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                           width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/fl_player_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                              width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                              mouseUp=<span style="color: #ff0000;">&quot;fullImg3.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</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>
        <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: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 class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_PopUpAnchor_gallery_test/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_PopUpAnchor_gallery_test/main.html" width="100%" height="400"></iframe></p>
<p>Or you could convert the PopUpAnchor code into a custom component, 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/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-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_PopUpAnchor_gallery_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:comps=<span style="color: #ff0000;">&quot;comps.*&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HGroup</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: #808080; font-style: italic;">&lt;!-- 1 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb1&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/fx_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 2 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb2&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/ai_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 3 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb3&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/fl_player_appicon.jpg&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>And the custom PopUpThumb component, <em>comps/PopUpThumb.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/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> name=<span style="color: #ff0000;">&quot;PopUpThumb&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;">        mouseDown=<span style="color: #ff0000;">&quot;fullImg.displayPopUp = true;&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;">            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            public var thumbnailImgClass:Class;</span>
&nbsp;
<span style="color: #000000;">            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            public var fullImgSrc:String;</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;!-- embedded thumbnail image --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg&quot;</span></span>
<span style="color: #000000;">                   source=<span style="color: #ff0000;">&quot;{thumbnailImgClass}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg&quot;</span></span>
<span style="color: #000000;">                   popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                   width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- dynamically loaded full image --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;{fullImgSrc}&quot;</span></span>
<span style="color: #000000;">                      width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                      mouseUp=<span style="color: #ff0000;">&quot;fullImg.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</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: #7400FF;">&lt;/s:Group</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: 'Creating a simple image gallery using the Spark PopUpAnchor control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/',contentID: 'post-2413',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayPopUp,Gumbo,popUpWidthMatchesAnchorWidth',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/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</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>
		<item>
		<title>Creating a tile layout Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 06:59:24 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[TileLayout]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[popUpWidthMatchesAnchorWidth]]></category>
		<category><![CDATA[requestedColumnCount]]></category>
		<category><![CDATA[requestedRowCount]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can create a Spark DropDownList with a tile layout in Flex 4 by setting the layout property to a TileList object.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_TileLayout_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/halo&#34;&#62; &#160; &#60;s:DropDownList id=&#34;dropDownList&#34; labelField=&#34;label&#34; requireSelection=&#34;true&#34; skinClass=&#34;skins.CustomDropDownListSkin&#34; horizontalCenter=&#34;0&#34; width=&#34;100&#34; top=&#34;20&#34;&#62; &#60;s:dataProvider&#62; &#60;s:ArrayList&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a Spark DropDownList with a tile layout in Flex 4 by setting the <code>layout</code> property to a TileList object.</p>
<p>Full code after the jump.</p>
<p><span id="more-1049"></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/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_TileLayout_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/halo&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;dropDownList&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>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;skins.CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">            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> label=<span style="color: #ff0000;">&quot;The&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Quick&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Brown&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Fox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Jumps&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Over&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;The&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Lazy&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Dog&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>And the custom skin class, skins/CustomDropDownListSkin.mxml, 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/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Skin</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;">        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: #808080; font-style: italic;">&lt;!--- The PopUpAnchor control that opens the drop-down list. --&gt;</span></span>
    <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;false&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The drop down area of the skin. 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> 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: #808080; font-style: italic;">&lt;!-- drop shadow --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:RectangularDropShadow</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;1.0&quot;</span> distance=<span style="color: #ff0000;">&quot;5&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: #808080; font-style: italic;">&lt;!-- border --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</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: #7400FF;">&lt;s:SolidColorStroke</span> color=<span style="color: #ff0000;">&quot;0x686868&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;!--- The color of the drop down's background fill. The default color is 0xFFFFFF. --&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> 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> focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    minViewportInset=<span style="color: #ff0000;">&quot;1&quot;</span> verticalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The container for the data items in the drop-down list. --&gt;</span></span>
                <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><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:TileLayout</span> horizontalGap=<span style="color: #ff0000;">&quot;0&quot;</span> verticalGap=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                                requestedColumnCount=<span style="color: #ff0000;">&quot;3&quot;</span> requestedRowCount=<span style="color: #ff0000;">&quot;2&quot;</span> columnWidth=<span style="color: #ff0000;">&quot;100&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 anchor button used by the DropDownList. 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: #808080; font-style: italic;">&lt;!--- The prompt area of the DropDownList. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleText</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;">            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> 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:Skin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_DropDownList_TileLayout_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_DropDownList_TileLayout_test/bin/main.html" width="100%" height="100"></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 a tile layout Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/',contentID: 'post-1049',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,layout,popUpWidthMatchesAnchorWidth,requestedColumnCount,requestedRowCount',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/2009/04/15/creating-a-tile-layout-spark-dropdownlist-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting the width of the pop up on a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 06:59:24 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[DropDownList]]></category>
		<category><![CDATA[DropDownListSkin]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[popUp]]></category>
		<category><![CDATA[popUpWidthMatchesAnchorWidth]]></category>
		<category><![CDATA[skinClass]]></category>
		<category><![CDATA[width]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can set the drop down menu width on a Spark DropDownList control by setting the width property within a custom DropDownList skin.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_skinClass_width_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;s:DropDownList id=&#34;dropDownList&#34; labelField=&#34;label&#34; requireSelection=&#34;true&#34; skinClass=&#34;skins.CustomDropDownListSkin&#34; horizontalCenter=&#34;0&#34; top=&#34;20&#34;&#62; &#60;s:dataProvider&#62; &#60;s:ArrayList&#62; &#60;fx:Object label=&#34;Adobe AIR&#34; /&#62; &#60;fx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the drop down menu width on a Spark DropDownList control by setting the <code>width</code> property within a custom DropDownList skin.</p>
<p><span id="more-1047"></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/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_skinClass_width_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;dropDownList&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>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;skins.CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            top=<span style="color: #ff0000;">&quot;20&quot;</span><span 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> label=<span style="color: #ff0000;">&quot;Adobe AIR&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;ColdFusion&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Dreamweaver&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash Player&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Fireworks&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flex&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Illustrator&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>And the custom skin class, <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/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/ --&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;">                    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>
<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>
        <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></span>
<span style="color: #000000;">                minHeight=<span style="color: #ff0000;">&quot;22&quot;</span></span>
<span style="color: #000000;">                maxHeight=<span style="color: #ff0000;">&quot;134&quot;</span></span>
<span style="color: #000000;">                width=<span style="color: #ff0000;">&quot;300&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> 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></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;!--- The color of the drop down's background fill. The default color is 0xFFFFFF. --&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;">            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;">            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></span>
<span style="color: #000000;">            verticalAlign=<span style="color: #ff0000;">&quot;middle&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></span>
<span style="color: #000000;">            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;">            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_skinClass_width_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_skinClass_width_test/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>skinClass</code> style in an advanced .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/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_skinClass_width_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 {
            skinClass: ClassReference(&quot;skins.CustomDropDownListSkin&quot;);
        }
    <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;dropDownList&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>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            top=<span style="color: #ff0000;">&quot;20&quot;</span><span 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> label=<span style="color: #ff0000;">&quot;Adobe AIR&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;ColdFusion&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Dreamweaver&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash Player&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Fireworks&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flex&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Illustrator&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>Or you can set the <code>skinClass</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/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_skinClass_width_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:Button</span> id=<span style="color: #ff0000;">&quot;btn&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;Set DropDownList skinClass&quot;</span></span>
<span style="color: #000000;">                click=<span style="color: #ff0000;">&quot;btn_clickHandler(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;">            import skins.CustomDropDownListSkin;</span>
&nbsp;
<span style="color: #000000;">            protected function btn_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;">                dropDownList.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;skinClass&quot;</span>, CustomDropDownListSkin<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;dropDownList&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>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            top=<span style="color: #ff0000;">&quot;20&quot;</span><span 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> label=<span style="color: #ff0000;">&quot;Adobe AIR&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;ColdFusion&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Dreamweaver&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flash Player&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Fireworks&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Flex&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Illustrator&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 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 pop up on a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/',contentID: 'post-1047',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,popUp,popUpWidthMatchesAnchorWidth,skinClass,width',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/2009/04/13/setting-the-width-of-the-pop-up-on-a-spark-dropdownlist-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

