<?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; List</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/list/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>Disabling item highlight indicator in the MX List control in Flex 3</title>
		<link>http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/</link>
		<comments>http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 17:54:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[drawHighlightIndicator()]]></category>
		<category><![CDATA[textRollOverColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=3167</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/02/01/disabling-item-roll-over-highlighting-in-the-flex-datagrid-control/">&#8220;Disabling item roll over highlighting in the Flex DataGrid control&#8221;</a>, we saw how you could disable the item roll over highlight in the MX DataGrid control in Flex by setting the Boolean useRollOver style.</p> <p>The following example shows how you can disable the highlight indicator in the MX List control [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/02/01/disabling-item-roll-over-highlighting-in-the-flex-datagrid-control/">&#8220;Disabling item roll over highlighting in the Flex DataGrid control&#8221;</a>, we saw how you could disable the item roll over highlight in the MX DataGrid control in Flex by setting the Boolean <code>useRollOver</code> style.</p>
<p>The following example shows how you can disable the highlight indicator in the MX List control in Flex 3 by subclassing the List control and overriding the protected <code>drawHighlightIndicator()</code> method.</p>
<p><span id="more-3167"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;MX_List_drawHighlightIndicator_test&quot;</span></span>
<span style="color: #000000;">                xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">                xmlns:comps=<span style="color: #ff0000;">&quot;comps.*&quot;</span></span>
<span style="color: #000000;">                layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">                verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">                backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:NoHighlightList</span> id=<span style="color: #ff0000;">&quot;lst&quot;</span></span>
<span style="color: #000000;">            dataProvider=<span style="color: #ff0000;">&quot;[Red,Orange,Yellow,Green,Blue]&quot;</span></span>
<span style="color: #000000;">            alternatingItemColors=<span style="color: #ff0000;">&quot;[#FFFFFF,#EEEEEE]&quot;</span></span>
<span style="color: #000000;">            textRollOverColor=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            rowCount=<span style="color: #ff0000;">&quot;4&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom MX List control, <em>comps/NoHighlightList.as</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/** http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/ */</span>
<span style="color: #9900cc; font-weight: bold;">package</span> comps <span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>List<span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>listClasses<span style="color: #000066; font-weight: bold;">.</span>IListItemRenderer<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> NoHighlightList <span style="color: #0033ff; font-weight: bold;">extends</span> List <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> NoHighlightList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> drawHighlightIndicator<span style="color: #000000;">&#40;</span>indicator<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Sprite</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">color</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span><span style="color: #000066; font-weight: bold;">,</span> itemRenderer<span style="color: #000066; font-weight: bold;">:</span>IListItemRenderer<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #009900; font-style: italic;">// ignore</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Or, if you want to create the custom List control using MXML instead of ActionScript, you could do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">&nbsp;
<span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span> name=<span style="color: #ff0000;">&quot;NoHighlightListMXML&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.controls.listClasses.IListItemRenderer;</span>
&nbsp;
<span style="color: #339933;">            override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void {</span>
<span style="color: #339933;">                // ignore</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Disabling item highlight indicator in the MX List control in Flex 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/',contentID: 'post-3167',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'drawHighlightIndicator(),textRollOverColor',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/06/18/disabling-item-highlight-indicator-in-the-mx-list-control-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Changing the mouse cursor when rolling over items in an MX List control in Flex</title>
		<link>http://blog.flexexamples.com/2010/02/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2010/02/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 01:56:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[CursorManager]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[hasOwnProperty()]]></category>
		<category><![CDATA[itemRollOut]]></category>
		<category><![CDATA[itemRollOver]]></category>
		<category><![CDATA[removeAllCursors()]]></category>
		<category><![CDATA[setCursor()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2363</guid>
		<description><![CDATA[<p>The following example shows how you can change the mouse cursor when rolling over an item in an MX List control in Flex by listening for the itemRollOver and itemRollOut events and using the CursorManager.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/ --&#62; &#60;mx:Application name=&#34;MX_List_itemRollOver_cursor_test&#34; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; &#160; &#60;mx:Script&#62; &#60;![CDATA[ import mx.events.ListEvent; &#160; [Embed(&#34;assets/accept.png&#34;)] [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the mouse cursor when rolling over an item in an MX List control in Flex by listening for the <code>itemRollOver</code> and <code>itemRollOut</code> events and using the CursorManager.</p>
<p><span id="more-2363"></span></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/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;MX_List_itemRollOver_cursor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.events.ListEvent;</span>
&nbsp;
<span style="color: #339933;">            [Embed(&quot;assets/accept.png&quot;)]</span>
<span style="color: #339933;">            public static const accept:Class;</span>
&nbsp;
<span style="color: #339933;">            [Embed(&quot;assets/anchor.png&quot;)]</span>
<span style="color: #339933;">            public static const anchor:Class;</span>
&nbsp;
<span style="color: #339933;">            protected function list_itemRollOverHandler(evt:ListEvent):void {</span>
<span style="color: #339933;">                var dat:Object = evt.itemRenderer.data;</span>
<span style="color: #339933;">                if (dat.hasOwnProperty(&quot;curses&quot;)) {</span>
<span style="color: #339933;">                    cursorManager.setCursor(dat.curses);</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            protected function list_itemRollOutHandler(evt:ListEvent):void {</span>
<span style="color: #339933;">                cursorManager.removeAllCursors();</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span> id=<span style="color: #ff0000;">&quot;list&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">            itemRollOver=<span style="color: #ff0000;">&quot;list_itemRollOverHandler(event);&quot;</span></span>
<span style="color: #000000;">            itemRollOut=<span style="color: #ff0000;">&quot;list_itemRollOutHandler(event);&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Anchor cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;{anchor}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;default cursor&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Anchor cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;{anchor}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Accept cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;{accept}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or, if you didn&#8217;t want to use data binding in the data provider, you could set a simple string to an embedded image, 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/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;MX_List_itemRollOver_cursor_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import flash.utils.getDefinitionByName;</span>
<span style="color: #339933;">            import mx.events.ListEvent;</span>
&nbsp;
<span style="color: #339933;">            [Embed(&quot;assets/accept.png&quot;)]</span>
<span style="color: #339933;">            public const accept:Class;</span>
&nbsp;
<span style="color: #339933;">            [Embed(&quot;assets/anchor.png&quot;)]</span>
<span style="color: #339933;">            public const anchor:Class;</span>
&nbsp;
<span style="color: #339933;">            protected function list_itemRollOverHandler(evt:ListEvent):void {</span>
<span style="color: #339933;">                var dat:Object = evt.itemRenderer.data;</span>
<span style="color: #339933;">                if (dat.hasOwnProperty(&quot;curses&quot;)) {</span>
<span style="color: #339933;">                    var cursorClass:Class = this[dat.curses] as Class;</span>
<span style="color: #339933;">                    cursorManager.setCursor(cursorClass);</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            protected function list_itemRollOutHandler(evt:ListEvent):void{</span>
<span style="color: #339933;">                cursorManager.removeAllCursors();</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:List</span> id=<span style="color: #ff0000;">&quot;list&quot;</span></span>
<span style="color: #000000;">            itemRollOver=<span style="color: #ff0000;">&quot;list_itemRollOverHandler(event);&quot;</span></span>
<span style="color: #000000;">            itemRollOut=<span style="color: #ff0000;">&quot;list_itemRollOutHandler(event);&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Anchor cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;anchor&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;default cursor&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Anchor cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;anchor&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Accept cursor&quot;</span> curses=<span style="color: #ff0000;">&quot;accept&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayCollection</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the mouse cursor when rolling over items in an MX List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/',contentID: 'post-2363',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'hasOwnProperty(),itemRollOut,itemRollOver,removeAllCursors(),setCursor()',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/01/changing-the-mouse-cursor-when-rolling-over-items-in-an-mx-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a CFF embedded font with a Halo List control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/11/17/using-a-cff-embedded-font-with-a-halo-list-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/11/17/using-a-cff-embedded-font-with-a-halo-list-control-in-flex-4/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 21:55:19 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[textFieldClass]]></category>
		<category><![CDATA[UIFTETextField]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2213</guid>
		<description><![CDATA[<p>The following example shows how you can use a CFF/DefineFont4 embedded font with a Halo/MX List control in Flex 4 by setting the textFieldClass style to the new mx.core.UIFTETextField class.</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/11/17/using-a-cff-embedded-font-with-a-halo-list-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Halo_List_textFieldClass_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; &#60;s:controlBarContent&#62; &#60;s:Label id=&#34;sdkVer&#34; fontFamily=&#34;df4ster&#34; fontSize=&#34;24&#34; initialize=&#34;sdkVer.text = mx_internal::VERSION;&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use a CFF/DefineFont4 embedded font with a Halo/MX List control in Flex 4 by setting the <code>textFieldClass</code> style to the new mx.core.UIFTETextField class.</p>
<p>Full code after the jump.</p>
<p><span id="more-2213"></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/11/17/using-a-cff-embedded-font-with-a-halo-list-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;Halo_List_textFieldClass_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>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span></span>
<span style="color: #000000;">                fontFamily=<span style="color: #ff0000;">&quot;df4ster&quot;</span></span>
<span style="color: #000000;">                fontSize=<span style="color: #ff0000;">&quot;24&quot;</span></span>
<span style="color: #000000;">                initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&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: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/halo&quot;;
&nbsp;
        @font-face {
            src: url(&quot;C:/Windows/Fonts/Arial.ttf&quot;);
            embedAsCFF: true;
            fontFamily: df4ster;
        }
&nbsp;
        mx|List {
            color: red;
            fontFamily: df4ster;
            fontSize: 16;
            textFieldClass: ClassReference(&quot;mx.core.UIFTETextField&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;mx:List</span> id=<span style="color: #ff0000;">&quot;lst&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx: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;Button&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/Button.png')&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;ButtonBar&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/ButtonBar.png')&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;CheckBox&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/CheckBox.png')&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;DataGroup&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/DataGroup.png')&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;HGroup&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HGroup.png')&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;HScrollBar&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HScrollBar.png')&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;HSlider&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HSlider.png')&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;Label&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/Label.png')&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;List&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/List.png')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or you can set the <code>textFieldClass</code> style on the mx|ListItemRenderer selector, 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/11/17/using-a-cff-embedded-font-with-a-halo-list-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;Halo_List_textFieldClass_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>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;sdkVer&quot;</span></span>
<span style="color: #000000;">                fontFamily=<span style="color: #ff0000;">&quot;df4ster&quot;</span></span>
<span style="color: #000000;">                fontSize=<span style="color: #ff0000;">&quot;24&quot;</span></span>
<span style="color: #000000;">                initialize=<span style="color: #ff0000;">&quot;sdkVer.text = mx_internal::VERSION;&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: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/halo&quot;;
&nbsp;
        @font-face {
            src: url(&quot;C:/Windows/Fonts/Arial.ttf&quot;);
            embedAsCFF: true;
            fontFamily: df4ster;
        }
&nbsp;
        mx|ListItemRenderer {
            color: red;
            fontFamily: df4ster;
            fontSize: 16;
            textFieldClass: ClassReference(&quot;mx.core.UIFTETextField&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;mx:List</span> id=<span style="color: #ff0000;">&quot;lst&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;200&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx: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;Button&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/Button.png')&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;ButtonBar&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/ButtonBar.png')&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;CheckBox&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/CheckBox.png')&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;DataGroup&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/DataGroup.png')&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;HGroup&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HGroup.png')&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;HScrollBar&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HScrollBar.png')&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;HSlider&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/HSlider.png')&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;Label&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/Label.png')&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;List&quot;</span> icon=<span style="color: #ff0000;">&quot;@Embed('assets/List.png')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/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: 'Using a CFF embedded font with a Halo List control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/11/17/using-a-cff-embedded-font-with-a-halo-list-control-in-flex-4/',contentID: 'post-2213',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,textFieldClass,UIFTETextField',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/11/17/using-a-cff-embedded-font-with-a-halo-list-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the border skin on a List control in Flex</title>
		<link>http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 07:58:37 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[borderSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can remove the border skin on a Flex List control by setting the borderSkin style to null using MXML, CSS, and ActionScript.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/ --&#62; &#60;mx:Application name="List_borderSkin_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:List id="list" dataProvider="[Red,Orange,Yellow,Green,Blue]" borderSkin="{null}" width="100" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can remove the border skin on a Flex List control by setting the <code>borderSkin</code> style to <code>null</code> using MXML, CSS, and ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-951"></span></p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application name="List_borderSkin_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:List id="list"
            dataProvider="[Red,Orange,Yellow,Green,Blue]"
            borderSkin="{null}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>You can also set the <code>borderSkin</code> style in an external .CSS file or &lt;Style&gt; block, as seen in the following example:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application name="List_borderSkin_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        List {
            borderSkin: ClassReference(null);
        }
    &lt;/mx:Style&gt;

    &lt;mx:List id="list"
            dataProvider="[Red,Orange,Yellow,Green,Blue]"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>borderSkin</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application name="List_borderSkin_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init():void {
                list.setStyle("borderSkin", null);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:List id="list"
            dataProvider="[Red,Orange,Yellow,Green,Blue]"
            width="100"
            initialize="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Removing the border skin on a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/02/02/removing-the-border-skin-on-a-list-control-in-flex/',contentID: 'post-951',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderSkin',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/02/02/removing-the-border-skin-on-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Toggling item roll over highlighting on a List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 04:34:31 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[useRollOver]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can toggle item roll over highlighting on a Flex List control by setting the useRollOver style.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/ --&#62; &#60;mx:Application name="List_useRollOver_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Array id="arr"&#62; &#60;mx:Object label="Button" icon="@Embed('assets/Button.png')" /&#62; &#60;mx:Object label="ButtonBar" icon="@Embed('assets/ButtonBar.png')" /&#62; &#60;mx:Object label="CheckBox" icon="@Embed('assets/CheckBox.png')" /&#62; &#60;mx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle item roll over highlighting on a Flex List control by setting the <code>useRollOver</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-760"></span></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application name="List_useRollOver_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="Button"
                icon="@Embed('assets/Button.png')" /&gt;
        &lt;mx:Object label="ButtonBar"
                icon="@Embed('assets/ButtonBar.png')" /&gt;
        &lt;mx:Object label="CheckBox"
                icon="@Embed('assets/CheckBox.png')" /&gt;
        &lt;mx:Object label="ColorPicker"
                icon="@Embed('assets/ColorPicker.png')" /&gt;
        &lt;mx:Object label="ComboBox"
                icon="@Embed('assets/ComboBox.png')" /&gt;
        &lt;mx:Object label="DataGrid"
                icon="@Embed('assets/DataGrid.png')" /&gt;
        &lt;mx:Object label="DateChooser"
                icon="@Embed('assets/DateChooser.png')" /&gt;
        &lt;mx:Object label="DateField"
                icon="@Embed('assets/DateField.png')" /&gt;
        &lt;mx:Object label="HorizontalList"
                icon="@Embed('assets/HorizontalList.png')" /&gt;
        &lt;mx:Object label="HRule"
                icon="@Embed('assets/HRule.png')" /&gt;
        &lt;mx:Object label="HScrollBar"
                icon="@Embed('assets/HScrollBar.png')" /&gt;
        &lt;mx:Object label="HSlider"
                icon="@Embed('assets/HSlider.png')" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="useRollOver:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            useRollOver="{checkBox.selected}"
            verticalScrollPolicy="on"
            width="150" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling item roll over highlighting on a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/',contentID: 'post-760',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'useRollOver',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/2008/09/20/toggling-item-roll-over-highlighting-on-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the item selection duration on a List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 04:54:53 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[selectionDuration]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the item selection duration on a Flex List control by setting the selectionDuration style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Array id="arr"&#62; &#60;mx:Object label="One" /&#62; &#60;mx:Object label="Two" /&#62; &#60;mx:Object label="Three" /&#62; &#60;mx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the item selection duration on a Flex List control by setting the <code>selectionDuration</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-709"></span></p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain" indicatorGap="0"&gt;
            &lt;mx:FormItem label="selectionDuration:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0"
                        maximum="2000"
                        value="250"
                        snapInterval="1"
                        tickInterval="100"
                        dataTipPrecision="0"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            selectionDuration="{slider.value}"
            width="200"
            selectionColor="red" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>You can also set the <code>selectionDuration</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Style&gt;
        List {
            selectionColor: red;
            selectionDuration: 1500;
        }
    &lt;/mx:Style&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            width=&quot;200&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>You can also set the <code>selectionDuration</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                list.setStyle(&quot;selectionDuration&quot;, evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Form styleName=&quot;plain&quot; indicatorGap=&quot;0&quot;&gt;
            &lt;mx:FormItem label=&quot;selectionDuration:&quot;&gt;
                &lt;mx:HSlider id=&quot;slider&quot;
                        minimum=&quot;0&quot;
                        maximum=&quot;2000&quot;
                        value=&quot;250&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;100&quot;
                        dataTipPrecision=&quot;0&quot;
                        liveDragging=&quot;true&quot;
                        <strong style="color:red;">change=&quot;slider_change(event);&quot;</strong> /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            width=&quot;200&quot;
            selectionColor=&quot;red&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.controls.HSlider;
            import mx.controls.List;
            import mx.controls.sliderClasses.Slider;
            import mx.events.SliderEvent;

            private var arr:Array;
            private var slider:HSlider;
            private var list:List;

            private function init():void {
                arr = [];
                arr.push({label:"One"});
                arr.push({label:"Two"});
                arr.push({label:"Three"});
                arr.push({label:"Four"});
                arr.push({label:"Five"});
                arr.push({label:"Six"});
                arr.push({label:"Seven"});
                arr.push({label:"Eight"});
                arr.push({label:"Nine"});
                arr.push({label:"Ten"});

                slider = new HSlider();
                slider.minimum = 0;
                slider.maximum = 2000;
                slider.value = 250;
                slider.snapInterval = 1;
                slider.tickInterval = 100;
                slider.liveDragging = true;
                slider.setStyle("dataTipPrecision", 0);
                slider.addEventListener(SliderEvent.CHANGE, slider_change);

                var formItem:FormItem = new FormItem();
                formItem.label = "selectionDuration:";
                formItem.addChild(slider);

                var form:Form = new Form();
                form.styleName = "plain";
                form.setStyle("indicatorGap", 0);
                form.addChild(formItem);

                var appControlBar:ApplicationControlBar;
                appControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(form);
                Application.application.addChildAt(appControlBar, 0);

                list = new List();
                list.dataProvider = arr;
                list.width = 200;
                list.setStyle("selectionColor", "red");
                addChild(list);
            }

            private function slider_change(evt:SliderEvent):void {
                list.setStyle("selectionDuration", evt.value);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the item selection duration on a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/',contentID: 'post-709',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'selectionDuration',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/2008/07/30/setting-the-item-selection-duration-on-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting an effect when the items in a data provider change on a List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 06:58:45 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DefaultListEffect]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[itemsChangeEffect]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can add a data effect when the items in a data provider change in a Flex List control by setting the itemsChangeEffect effect style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can add a data effect when the items in a data provider change in a Flex List control by setting the <code>itemsChangeEffect</code> effect style.</p>
<p>Full code after the jump.</p>
<p><span id="more-722"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function addItemToDataProvider():void {
                var obj:Object = {label:new Date().toTimeString()};
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.addItemAt(obj, idx);
            }

            private function removeItemFromDataProvider():void {
                if (arrColl.length == 0) {
                    return;
                }
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.removeItemAt(idx);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl" /&gt;

    &lt;mx:DefaultListEffect id="defaultListEffect" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Add item"
                click="addItemToDataProvider();" /&gt;
        &lt;mx:Button label="Delete item"
                click="removeItemFromDataProvider();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arrColl}"
            itemsChangeEffect="{defaultListEffect}"
            variableRowHeight="true"
            width="200" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>itemsChangeEffect</code> effect in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following snippet:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function addItemToDataProvider():void {
                var obj:Object = {label:new Date().toTimeString()};
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.addItemAt(obj, idx);
            }

            private function removeItemFromDataProvider():void {
                if (arrColl.length == 0) {
                    return;
                }
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.removeItemAt(idx);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    <strong style="color:red;">&lt;mx:Style&gt;
        List {
            itemsChangeEffect: ClassReference(&quot;mx.effects.DefaultTileListEffect&quot;);
        }
    &lt;/mx:Style&gt;</strong>

    &lt;mx:ArrayCollection id=&quot;arrColl&quot; /&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Button label=&quot;Add item&quot;
                click=&quot;addItemToDataProvider();&quot; /&gt;
        &lt;mx:Button label=&quot;Delete item&quot;
                click=&quot;removeItemFromDataProvider();&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arrColl}&quot;
            variableRowHeight=&quot;true&quot;
            width=&quot;200&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>itemsChangeEffect</code> effect using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_itemsChangeEffect_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            <strong style="color:red;">import mx.effects.DefaultListEffect;

            private function init():void {
                list.setStyle(&quot;itemsChangeEffect&quot;, DefaultListEffect);
            }</strong>

            private function addItemToDataProvider():void {
                var obj:Object = {label:new Date().toTimeString()};
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.addItemAt(obj, idx);
            }

            private function removeItemFromDataProvider():void {
                if (arrColl.length == 0) {
                    return;
                }
                var idx:int = Math.max(list.selectedIndex, 0);
                list.scrollToIndex(idx);
                arrColl.removeItemAt(idx);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id=&quot;arrColl&quot; /&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Button label=&quot;Add item&quot;
                click=&quot;addItemToDataProvider();&quot; /&gt;
        &lt;mx:Button label=&quot;Delete item&quot;
                click=&quot;removeItemFromDataProvider();&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arrColl}&quot;
            variableRowHeight=&quot;true&quot;
            width=&quot;200&quot;
            <strong style="color:red;">initialize=&quot;init();&quot;</strong> /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting an effect when the items in a data provider change on a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/',contentID: 'post-722',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'itemsChangeEffect',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/2008/07/29/setting-an-effect-when-the-items-in-a-data-provider-change-on-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Setting the label color of a selected item on a List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 06:21:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[textSelectedColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the label color for a selected item in a Flex List control by setting the textSelectedColor style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Array id="arr"&#62; &#60;mx:Object label="One" /&#62; &#60;mx:Object label="Two" /&#62; &#60;mx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the label color for a selected item in a Flex List control by setting the <code>textSelectedColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-721"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="textSelectedColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            textSelectedColor="{colorPicker.selectedColor}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>textSelectedColor</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        List {
            textSelectedColor: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>textSelectedColor</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_textSelectedColor_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                list.setStyle("textSelectedColor", evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="textSelectedColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        change="colorPicker_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the label color of a selected item on a List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/',contentID: 'post-721',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'textSelectedColor',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/2008/07/28/setting-the-label-color-of-a-selected-item-on-a-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toggling a drop shadow on the List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 06:09:34 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[dropShadowEnabled]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can toggle a drop shadow on a Flex List control by setting the dropShadowEnabled style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Array id="arr"&#62; &#60;mx:Object label="One" /&#62; &#60;mx:Object label="Two" /&#62; &#60;mx:Object label="Three" /&#62; &#60;mx:Object label="Four" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle a drop shadow on a Flex List control by setting the <code>dropShadowEnabled</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-715"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="dropShadowEnabled:"&gt;
                &lt;mx:CheckBox id="checkBox" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            dropShadowEnabled="{checkBox.selected}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>dropShadowEnabled</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Style&gt;
        List {
            dropShadowEnabled: true;
        }
    &lt;/mx:Style&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            width=&quot;100&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>dropShadowEnabled</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_dropShadowEnabled_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Script&gt;
        &lt;![CDATA[
            private function checkBox_change(evt:Event):void {
                list.setStyle(&quot;dropShadowEnabled&quot;, checkBox.selected);
            }
        ]]&gt;
    &lt;/mx:Script&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Form styleName=&quot;plain&quot;&gt;
            &lt;mx:FormItem label=&quot;dropShadowEnabled:&quot;&gt;
                &lt;mx:CheckBox id=&quot;checkBox&quot;
                        <strong style="color:red;">change=&quot;checkBox_change(event);&quot;</strong> /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            width=&quot;100&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling a drop shadow on the List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/',contentID: 'post-715',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dropShadowEnabled',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/2008/07/22/toggling-a-drop-shadow-on-the-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the label color on a disabled List control in Flex</title>
		<link>http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 06:54:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[List]]></category>
		<category><![CDATA[disabledColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/17/changing-the-background-color-of-a-disabled-list-control-in-flex/">&#8220;Changing the background color of a disabled List control in Flex&#8221;</a>, we saw how you could customize the background color of a disabled Flex List control by setting the backgroundDisabledColor style.</p> <p>The following example shows how you can set the label color on a disabled Flex ComboBox control by setting [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/07/17/changing-the-background-color-of-a-disabled-list-control-in-flex/">&#8220;Changing the background color of a disabled List control in Flex&#8221;</a>, we saw how you could customize the background color of a disabled Flex List control by setting the <code>backgroundDisabledColor</code> style.</p>
<p>The following example shows how you can set the label color on a disabled Flex ComboBox control by setting the <code>disabledColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-714"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_disabledColor_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="One" /&gt;
        &lt;mx:Object label="Two" /&gt;
        &lt;mx:Object label="Three" /&gt;
        &lt;mx:Object label="Four" /&gt;
        &lt;mx:Object label="Five" /&gt;
        &lt;mx:Object label="Six" /&gt;
        &lt;mx:Object label="Seven" /&gt;
        &lt;mx:Object label="Eight" /&gt;
        &lt;mx:Object label="Nine" /&gt;
        &lt;mx:Object label="Ten" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="disabledColor:"&gt;
                &lt;mx:ColorPicker id="colorPicker"
                        selectedColor="#999999" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="enabled:"&gt;
                &lt;mx:CheckBox id="checkBox"
                        selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id="list"
            dataProvider="{arr}"
            enabled="{checkBox.selected}"
            disabledColor="{colorPicker.selectedColor}"
            width="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/List_disabledColor_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/List_disabledColor_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>disabledColor</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_disabledColor_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;top&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Style&gt;
        List {
            disabledColor: red;
        }
    &lt;/mx:Style&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Form styleName=&quot;plain&quot;&gt;
            &lt;mx:FormItem label=&quot;enabled:&quot;&gt;
                &lt;mx:CheckBox id=&quot;checkBox&quot;
                        selected=&quot;true&quot; /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            enabled=&quot;{checkBox.selected}&quot;
            width=&quot;100&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>disabledColor</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/List_disabledColor_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;top&quot;
        backgroundColor=&quot;white&quot;&gt;

    <strong style="color:red;">&lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                list.setStyle(&quot;disabledColor&quot;, evt.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;</strong>

    &lt;mx:Array id=&quot;arr&quot;&gt;
        &lt;mx:Object label=&quot;One&quot; /&gt;
        &lt;mx:Object label=&quot;Two&quot; /&gt;
        &lt;mx:Object label=&quot;Three&quot; /&gt;
        &lt;mx:Object label=&quot;Four&quot; /&gt;
        &lt;mx:Object label=&quot;Five&quot; /&gt;
        &lt;mx:Object label=&quot;Six&quot; /&gt;
        &lt;mx:Object label=&quot;Seven&quot; /&gt;
        &lt;mx:Object label=&quot;Eight&quot; /&gt;
        &lt;mx:Object label=&quot;Nine&quot; /&gt;
        &lt;mx:Object label=&quot;Ten&quot; /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Form styleName=&quot;plain&quot;&gt;
            &lt;mx:FormItem label=&quot;disabledColor:&quot;&gt;
                &lt;mx:ColorPicker id=&quot;colorPicker&quot;
                        selectedColor=&quot;#999999&quot;
                        <strong style="color:red;">change=&quot;colorPicker_change(event);&quot;</strong> /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label=&quot;enabled:&quot;&gt;
                &lt;mx:CheckBox id=&quot;checkBox&quot;
                        selected=&quot;true&quot; /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:List id=&quot;list&quot;
            dataProvider=&quot;{arr}&quot;
            enabled=&quot;{checkBox.selected}&quot;
            width=&quot;100&quot; /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the label color on a disabled List control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/',contentID: 'post-714',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'disabledColor',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/2008/07/21/setting-the-label-color-on-a-disabled-list-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

