<?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; HorizontalList</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/horizontallist/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>Displaying a border on specific sides of a HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 00:07:59 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[borderColor]]></category>
		<category><![CDATA[borderSides]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1243</guid>
		<description><![CDATA[<p>The following example shows how you can toggle which sides of a Flex HorizontalList control display the border outline by setting the borderSides style.</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/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/ --&#62; &#60;mx:Application name=&#34;HorizontalList_borderSides_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:HorizontalList id=&#34;hList&#34; borderColor=&#34;red&#34; borderSides=&#34;left right&#34; labelField=&#34;label&#34; horizontalScrollPolicy=&#34;on&#34; columnWidth=&#34;120&#34; columnCount=&#34;5&#34; rowHeight=&#34;90&#34;&#62; &#60;mx:dataProvider&#62; &#60;mx:ArrayCollection&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle which sides of a Flex HorizontalList control display the border outline by setting the <code>borderSides</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-1243"></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/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderSides_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: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            borderColor=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            borderSides=<span style="color: #ff0000;">&quot;left right&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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>You can also set the <code>borderSides</code> style in an external .CSS file or &lt;Style/&gt; block, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderSides_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: #000000;"><span style="color: #7400FF;">&lt;mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        HorizontalList {
            borderSides: &quot;top bottom&quot;;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            borderColor=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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, you can set the <code>borderSides</code> style using ActionScript, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderSides_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;">            private function checkBox_change(evt:Event):void {</span>
<span style="color: #339933;">                var sides:String = &quot;&quot;;</span>
<span style="color: #339933;">                if (leftCh.selected) {</span>
<span style="color: #339933;">                    sides += &quot; left&quot;;</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">                if (rightCh.selected) {</span>
<span style="color: #339933;">                    sides += &quot; right&quot;;</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">                if (topCh.selected) {</span>
<span style="color: #339933;">                    sides += &quot; top&quot;;</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">                if (bottomCh.selected) {</span>
<span style="color: #339933;">                    sides += &quot; bottom&quot;;</span>
<span style="color: #339933;">                }</span>
<span style="color: #339933;">                hList.setStyle(&quot;borderSides&quot;, sides);</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:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;left:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;leftCh&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;right:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;rightCh&quot;</span> </span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;top:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;topCh&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;bottom:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;bottomCh&quot;</span></span>
<span style="color: #000000;">                        selected=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;checkBox_change(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            borderColor=<span style="color: #ff0000;">&quot;red&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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: 'Displaying a border on specific sides of a HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/',contentID: 'post-1243',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderColor,borderSides',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/07/26/displaying-a-border-on-specific-sides-of-a-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the border color on a HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 06:59:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[borderColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1247</guid>
		<description><![CDATA[<p>The following example shows how you can set the border color on a Flex HorizontalList control by setting the borderColor style.</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/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/ --&#62; &#60;mx:Application name=&#34;HorizontalList_borderColor_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:ApplicationControlBar dock=&#34;true&#34;&#62; &#60;mx:Form styleName=&#34;plain&#34;&#62; &#60;mx:FormItem label=&#34;borderColor:&#34;&#62; &#60;mx:ColorPicker id=&#34;colorPicker&#34; selectedColor=&#34;black&#34; /&#62; &#60;/mx:FormItem&#62; &#60;/mx:Form&#62; &#60;/mx:ApplicationControlBar&#62; &#160; &#60;mx:HorizontalList [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the border color on a Flex HorizontalList control by setting the <code>borderColor</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-1247"></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/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderColor_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: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;borderColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;colorPicker&quot;</span> selectedColor=<span style="color: #ff0000;">&quot;black&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            borderColor=<span style="color: #ff0000;">&quot;{colorPicker.selectedColor}&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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>You can also set the <code>borderColor</code> style in an external .CSS file or &lt;Style/&gt; block, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderColor_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: #000000;"><span style="color: #7400FF;">&lt;mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        HorizontalList {
            borderColor: haloBlue;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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, you can set the <code>borderColor</code> style using ActionScript, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_borderColor_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.ColorPickerEvent;</span>
&nbsp;
<span style="color: #339933;">            protected function colorPicker_change(evt:ColorPickerEvent):void {</span>
<span style="color: #339933;">                hList.setStyle(&quot;borderColor&quot;, evt.color);</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:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;borderColor:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;colorPicker&quot;</span></span>
<span style="color: #000000;">                        selectedColor=<span style="color: #ff0000;">&quot;black&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;colorPicker_change(event);&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;hList&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span></span>
<span style="color: #000000;">            columnWidth=<span style="color: #ff0000;">&quot;120&quot;</span></span>
<span style="color: #000000;">            columnCount=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            rowHeight=<span style="color: #ff0000;">&quot;90&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;One&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;Two&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;Three&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;Four&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;Five&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;Six&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;Seven&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;Eight&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;Nine&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:HorizontalList</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: 'Setting the border color on a HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/',contentID: 'post-1247',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'borderColor',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/06/29/setting-the-border-color-on-a-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a simple image gallery with the Flex HorizontalList control (redux)</title>
		<link>http://blog.flexexamples.com/2008/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/</link>
		<comments>http://blog.flexexamples.com/2008/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 03:55:32 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[PopUpManager]]></category>
		<category><![CDATA[doubleClick]]></category>
		<category><![CDATA[itemRollOut]]></category>
		<category><![CDATA[itemRollOver]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, we saw how to create a simple image gallery using the HorizontalList control and Image control in Flex.</p> <p>The following example shows how you can change the full image whenever you roll your mouse cursor over the items in the [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, we saw how to create a simple image gallery using the HorizontalList control and Image control in Flex.</p>
<p>The following example shows how you can change the full image whenever you roll your mouse cursor over the items in the HorizontalList control, as well as how you can double click an item in the Horizontal List control to display the image using the PopUpManager class.</p>
<p>Full code after the jump.</p>
<p><span id="more-734"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_itemRollOver_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/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        Panel {
            titleStyleName: panelTitleStyle;
        }

        .panelTitleStyle {
            fontWeight: bold;
            letterSpacing: 4;
            textAlign: center;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Image;
            import mx.events.ListEvent;
            import mx.events.ResizeEvent;
            import mx.managers.PopUpManager;

            private var fullImg:Image;

            private function init(obj:Object = null):void {
                if (obj == null) {
                    panel.title = "";
                    img.source = null;
                } else {
                    panel.title = String(obj.@title).toUpperCase();
                    img.source = obj.@fullImage;
                }
            }

            private function horizontalList_change(evt:ListEvent):void {
                init(evt.target.selectedItem);
            }

            private function horizontalList_itemRollOver(evt:ListEvent):void {
                init(evt.itemRenderer.data);
            }

            private function horizontalList_itemRollOut(evt:ListEvent):void {
                if (horizontalList.selectedIndex == -1) {
                    init(null);
                } else {
                    init(horizontalList.selectedItem);
                }
            }

            private function horizontalList_doubleClick(evt:MouseEvent):void {
                var obj:Object = evt.currentTarget.selectedItem;
                fullImg = new Image();
                fullImg.source = obj.@fullImage;
                fullImg.toolTip = "Click to close pop up";
                fullImg.buttonMode = true;
                fullImg.useHandCursor = true;
                fullImg.addEventListener(ResizeEvent.RESIZE, fullImg_resize);
                fullImg.addEventListener(MouseEvent.CLICK, fullImg_click);
                PopUpManager.addPopUp(fullImg, this, true);
            }

            private function fullImg_resize(evt:ResizeEvent):void {
                PopUpManager.centerPopUp(fullImg);
            }

            private function fullImg_click(evt:MouseEvent):void {
                PopUpManager.removePopUp(fullImg);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:XML id="xml" source="gallery.xml" /&gt;
    &lt;mx:XMLListCollection id="xmlListColl" source="{xml.image}" /&gt;

    &lt;mx:Panel id="panel"
            layout="absolute"
            styleName="opaquePanel"
            height="100%"&gt;
        &lt;mx:Image id="img"
                scaleContent="true"
                horizontalCenter="0"
                verticalCenter="0"
                maintainAspectRatio="true"
                width="250"
                height="250"
                completeEffect="Fade" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:HorizontalList id="horizontalList"
                    dataProvider="{xmlListColl}"
                    labelField="lbl"
                    iconField="src"
                    itemRenderer="CustomItemRenderer"
                    columnCount="4"
                    columnWidth="125"
                    rowHeight="100"
                    horizontalScrollPolicy="on"
                    change="horizontalList_change(event);"
                    itemRollOver="horizontalList_itemRollOver(event);"
                    itemRollOut="horizontalList_itemRollOut(event);"
                    doubleClickEnabled="true"
                    doubleClick="horizontalList_doubleClick(event);" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_itemRollOver_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/HorizontalList_itemRollOver_test/bin/main.html" width="100%" height="600"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a simple image gallery with the Flex HorizontalList control (redux) on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/',contentID: 'post-734',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'doubleClick,itemRollOut,itemRollOver',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/08/06/creating-a-simple-image-gallery-with-the-flex-horizontallist-control-redux/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Setting the horizontal scroll position in the HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 03:15:23 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[horizontalScrollPosition]]></category>
		<category><![CDATA[max()]]></category>
		<category><![CDATA[maxHorizontalScrollPosition]]></category>
		<category><![CDATA[min()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can scroll the Flex HorizontalList control by setting the horizontalScrollPosition property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_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/04/03/scrolling-the-horizontallist-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[ import mx.events.SliderEvent; private function prev():void { var pos:int = hList.horizontalScrollPosition-1; var min:int = 0; var [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can scroll the Flex HorizontalList control by setting the <code>horizontalScrollPosition</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-583"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_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/04/03/scrolling-the-horizontallist-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.SliderEvent;

            private function prev():void {
                var pos:int = hList.horizontalScrollPosition-1;
                var min:int = 0;
                var value:int = Math.max(min, pos);
                hList.horizontalScrollPosition = value;
            }

            private function next():void {
                var pos:int = hList.horizontalScrollPosition+1;
                var max:int = hList.maxHorizontalScrollPosition;
                var value:int = Math.min(pos, max);
                hList.horizontalScrollPosition = value;
            }

            private function slider_change(evt:SliderEvent):void {
                hList.horizontalScrollPosition = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object lbl="Illustrator" src="ai_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Adobe AIR" src="air_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="ColdFusion" src="cf_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Dreamweaver" src="dw_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flash" src="fl_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flash Player" src="fl_player_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Fireworks" src="fw_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Flex" src="fx_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Lightroom" src="lr_appicon-tn.gif" /&gt;
        &lt;mx:Object lbl="Photoshop" src="ps_appicon-tn.gif" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:Panel styleName="opaquePanel"&gt;
        &lt;mx:HorizontalList id="hList"
                dataProvider="{arr}"
                itemRenderer="HorizontalListItemRenderer"
                verticalScrollPolicy="off"
                horizontalScrollPolicy="off"
                columnWidth="100"
                columnCount="4"
                rowHeight="100"
                rowCount="1"
                borderSkin="{null}" /&gt;
        &lt;mx:ControlBar&gt;
            &lt;mx:Button label="Previous" click="prev();" /&gt;
            &lt;mx:HSlider id="slider"
                    minimum="0"
                    maximum="{hList.maxHorizontalScrollPosition}"
                    value="{hList.horizontalScrollPosition}"
                    liveDragging="true"
                    snapInterval="1"
                    tickInterval="1"
                    showDataTip="false"
                    width="100%"
                    change="slider_change(event);" /&gt;
            &lt;mx:Button label="Next" click="next();" /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_test/bin/srcview/source/HorizontalListItemRenderer.mxml.html">View HorizontalListItemRenderer.mxml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/ --&gt;
&lt;mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
        styleName="plain"&gt;

    &lt;mx:Image source="{data.src}"
            horizontalCenter="0"
            verticalCenter="0" /&gt;
    &lt;mx:Label text="{data.lbl}"
            fontWeight="bold"
            horizontalCenter="0"
            bottom="0" /&gt;

&lt;/mx:Canvas&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_horizontalScrollPosition_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/HorizontalList_horizontalScrollPosition_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the horizontal scroll position in the HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/04/03/scrolling-the-horizontallist-control-in-flex/',contentID: 'post-583',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'horizontalScrollPosition,max(),maxHorizontalScrollPosition,min()',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/04/03/scrolling-the-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Creating a simple image gallery with the Flex HorizontalList control</title>
		<link>http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/</link>
		<comments>http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 05:08:19 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[columnCount]]></category>
		<category><![CDATA[columnWidth]]></category>
		<category><![CDATA[iconField]]></category>
		<category><![CDATA[itemRenderer]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/</guid>
		<description><![CDATA[<p>This request comes to us from a faithful reader who was wondering how you can display a full image when a user clicks on a thumbnail in a HorizontalList control in Flex. My solution was to put the thumbnail image and full image URLs in the data provider and then use bindings to the HorizontalList [...]]]></description>
			<content:encoded><![CDATA[<p>This request comes to us from a faithful reader who was wondering how you can display a full image when a user clicks on a thumbnail in a HorizontalList control in Flex. My solution was to put the thumbnail image and full image URLs in the data provider and then use bindings to the HorizontalList control&#8217;s <code>selectedItem</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-522"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_selectedItem_test/main.mxml">View MXML</a></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;HorizontalList_selectedItem_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;top&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;mx:Array</span> id=<span style="color: #ff0000;">&quot;arr&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;Flex&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/fx_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/fx_appicon.jpg&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;Flash&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/fl_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/fl_appicon.jpg&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;Illustrator&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/ai_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/ai_appicon.jpg&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;Dreamweaver&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/dw_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/dw_appicon.jpg&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;ColdFusion&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/cf_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/cf_appicon.jpg&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;Flash Player&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/fl_player_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/fl_player_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Object</span> label=<span style="color: #ff0000;">&quot;Fireworks&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/fw_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/fw_appicon.jpg&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;Lightroom&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/lr_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/lr_appicon.jpg&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;Photoshop&quot;</span></span>
<span style="color: #000000;">                thumbnailImage=<span style="color: #ff0000;">&quot;assets/ps_appicon-tn.gif&quot;</span></span>
<span style="color: #000000;">                fullImage=<span style="color: #ff0000;">&quot;assets/ps_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Panel</span> title=<span style="color: #ff0000;">&quot;{horizontalList.selectedItem.label}&quot;</span></span>
<span style="color: #000000;">            height=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #000000;">            horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;img&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{horizontalList.selectedItem.fullImage}&quot;</span></span>
<span style="color: #000000;">                maintainAspectRatio=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #000000;">                width=<span style="color: #ff0000;">&quot;{horizontalList.width}&quot;</span></span>
<span style="color: #000000;">                height=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ControlBar</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HorizontalList</span> id=<span style="color: #ff0000;">&quot;horizontalList&quot;</span></span>
<span style="color: #000000;">                    labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">                    iconField=<span style="color: #ff0000;">&quot;thumbnailImage&quot;</span></span>
<span style="color: #000000;">                    dataProvider=<span style="color: #ff0000;">&quot;{arr}&quot;</span></span>
<span style="color: #000000;">                    itemRenderer=<span style="color: #ff0000;">&quot;CustomItemRenderer&quot;</span></span>
<span style="color: #000000;">                    columnCount=<span style="color: #ff0000;">&quot;4&quot;</span></span>
<span style="color: #000000;">                    columnWidth=<span style="color: #ff0000;">&quot;125&quot;</span></span>
<span style="color: #000000;">                    rowCount=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">                    rowHeight=<span style="color: #ff0000;">&quot;100&quot;</span></span>
<span style="color: #000000;">                    horizontalScrollPolicy=<span style="color: #ff0000;">&quot;on&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ControlBar</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Panel</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_selectedItem_test/CustomItemRenderer.mxml">View CustomItemRenderer.mxml</a></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> name=<span style="color: #ff0000;">&quot;CustomItemRenderer&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;">        horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;{data.thumbnailImage}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;{data.label}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_selectedItem_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/HorizontalList_selectedItem_test/bin/main.html" width="100%" height="600"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a simple image gallery with the Flex HorizontalList control on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/',contentID: 'post-522',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'columnCount,columnWidth,iconField,itemRenderer',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Displaying scroll tips in a HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 05:01:06 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[showScrollTips]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can display scroll tips in a Flex HorizontalList control by setting the Boolean showScrollTips property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_showScrollTips_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-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="Accordion" /&#62; &#60;mx:Object label="ApplicationControlBar" /&#62; &#60;mx:Object label="Box" /&#62; &#60;mx:Object label="Canvas" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display scroll tips in a Flex HorizontalList control by setting the Boolean <code>showScrollTips</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-422"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_showScrollTips_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-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="Accordion" /&gt;
        &lt;mx:Object label="ApplicationControlBar" /&gt;
        &lt;mx:Object label="Box" /&gt;
        &lt;mx:Object label="Canvas" /&gt;
        &lt;mx:Object label="ControlBar" /&gt;
        &lt;mx:Object label="DividedBox" /&gt;
        &lt;mx:Object label="Form" /&gt;
        &lt;mx:Object label="FormHeading" /&gt;
        &lt;mx:Object label="FormItem" /&gt;
        &lt;mx:Object label="Grid" /&gt;
        &lt;mx:Object label="HBox" /&gt;
        &lt;mx:Object label="HDividedBox" /&gt;
        &lt;mx:Object label="Panel" /&gt;
        &lt;mx:Object label="TabNavigator" /&gt;
        &lt;mx:Object label="Tile" /&gt;
        &lt;mx:Object label="TitleWindow" /&gt;
        &lt;mx:Object label="VBox" /&gt;
        &lt;mx:Object label="VDividedBox" /&gt;
        &lt;mx:Object label="ViewStack" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:HorizontalList id="horizontalList"
            dataProvider="{arr}"
            columnWidth="175"
            columnCount="3"
            rowCount="1"
            rowHeight="100"
            showScrollTips="true" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_showScrollTips_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/HorizontalList_showScrollTips_test/bin/main.html" width="100%" height="200"></iframe></p>
<p>If you want to customize the scroll tip&#8217;s appearance, you can set the ToolTip style in an external .CSS file or &lt;mx:Style /&gt; block, as shown in the following snippet:</p>
<pre class="code">
&lt;mx:Style&gt;
    ToolTip {
        backgroundColor: haloBlue;
        color: white;
        fontWeight: bold;
    }
&lt;/mx:Style&gt;
</pre>
<p>If you want to customize the scroll tip&#8217;s text, you can set the <code>scrollTips</code> property to true and set the <code>scrollTipFunction</code> property, as shown in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_scrollTipFunction_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-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;
        ToolTip {
            backgroundColor: haloBlue;
            color: white;
            fontWeight: bold;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="Accordion" /&gt;
        &lt;mx:Object label="ApplicationControlBar" /&gt;
        &lt;mx:Object label="Box" /&gt;
        &lt;mx:Object label="Canvas" /&gt;
        &lt;mx:Object label="ControlBar" /&gt;
        &lt;mx:Object label="DividedBox" /&gt;
        &lt;mx:Object label="Form" /&gt;
        &lt;mx:Object label="FormHeading" /&gt;
        &lt;mx:Object label="FormItem" /&gt;
        &lt;mx:Object label="Grid" /&gt;
        &lt;mx:Object label="HBox" /&gt;
        &lt;mx:Object label="HDividedBox" /&gt;
        &lt;mx:Object label="Panel" /&gt;
        &lt;mx:Object label="TabNavigator" /&gt;
        &lt;mx:Object label="Tile" /&gt;
        &lt;mx:Object label="TitleWindow" /&gt;
        &lt;mx:Object label="VBox" /&gt;
        &lt;mx:Object label="VDividedBox" /&gt;
        &lt;mx:Object label="ViewStack" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.listClasses.TileBaseDirection;

            private function horizontalList_scrollTipFunc(direction:String, position:Number):String {
                var str:String;
                var max:Number;
                var pct:String;

                switch (direction) {
                    case TileBaseDirection.HORIZONTAL:
                        max = horizontalList.maxHorizontalScrollPosition;
                        break;
                    case TileBaseDirection.VERTICAL:
                        max = horizontalList.maxVerticalScrollPosition;
                        break;
                }

                pct = numberFormatter.format(position / max * 100);
                str = position + " of " + max + " (" + pct + "%)";

                return str;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:NumberFormatter id="numberFormatter" precision="0" /&gt;

    &lt;mx:HorizontalList id="horizontalList"
            dataProvider="{arr}"
            columnWidth="175"
            columnCount="3"
            rowCount="1"
            rowHeight="100"
            showScrollTips="true"
            scrollTipFunction="horizontalList_scrollTipFunc" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_scrollTipFunction_test/bin/main.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_scrollTipFunction_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying scroll tips in a HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/04/displaying-scroll-tips-in-a-horizontallist-control-in-flex/',contentID: 'post-422',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'showScrollTips',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/01/04/displaying-scroll-tips-in-a-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting alternating colors on a Flex HorizontalList control</title>
		<link>http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/</link>
		<comments>http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 04:17:58 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[alternatingItemColors]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/</guid>
		<description><![CDATA[<p>The following example shows how you can alternate item colors in a HorizontalList control in Flex by setting the alternatingItemColors style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_alternatingItemColors_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/ --&#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="Accordion" icon="@Embed('assets/Accordion.png')" /&#62; &#60;mx:Object label="ApplicationControlBar" icon="@Embed('assets/ApplicationControlBar.png')" /&#62; &#60;mx:Object label="Box" icon="@Embed('assets/Box.png')" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can alternate item colors in a HorizontalList control in Flex by setting the <code>alternatingItemColors</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-420"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_alternatingItemColors_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/ --&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="Accordion"
                icon="@Embed('assets/Accordion.png')" /&gt;
        &lt;mx:Object label="ApplicationControlBar"
                icon="@Embed('assets/ApplicationControlBar.png')" /&gt;
        &lt;mx:Object label="Box"
                icon="@Embed('assets/Box.png')" /&gt;
        &lt;mx:Object label="Canvas"
                icon="@Embed('assets/Canvas.png')" /&gt;
        &lt;mx:Object label="ControlBar"
                icon="@Embed('assets/ControlBar.png')" /&gt;
        &lt;mx:Object label="DividedBox"
                icon="@Embed('assets/DividedBox.png')" /&gt;
        &lt;mx:Object label="Form"
                icon="@Embed('assets/Form.png')" /&gt;
        &lt;mx:Object label="FormHeading"
                icon="@Embed('assets/FormHeading.png')" /&gt;
        &lt;mx:Object label="FormItem"
                icon="@Embed('assets/FormItem.png')" /&gt;
        &lt;mx:Object label="Grid"
                icon="@Embed('assets/Grid.png')" /&gt;
        &lt;mx:Object label="HBox"
                icon="@Embed('assets/HBox.png')" /&gt;
        &lt;mx:Object label="HDividedBox"
                icon="@Embed('assets/HDividedBox.png')" /&gt;
        &lt;mx:Object label="Panel"
                icon="@Embed('assets/Panel.png')" /&gt;
        &lt;mx:Object label="TabNavigator"
                icon="@Embed('assets/TabNavigator.png')" /&gt;
        &lt;mx:Object label="Tile"
                icon="@Embed('assets/Tile.png')" /&gt;
        &lt;mx:Object label="TitleWindow"
                icon="@Embed('assets/TitleWindow.png')" /&gt;
        &lt;mx:Object label="VBox"
                icon="@Embed('assets/VBox.png')" /&gt;
        &lt;mx:Object label="VDividedBox"
                icon="@Embed('assets/VDividedBox.png')" /&gt;
        &lt;mx:Object label="ViewStack"
                icon="@Embed('assets/ViewStack.png')" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:HorizontalList id="horizontalList"
            dataProvider="{arr}"
            alternatingItemColors="[#FFFFFF, #EEEEEE]"
            columnCount="3"
            columnWidth="175"
            rowCount="1"
            height="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_alternatingItemColors_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/HorizontalList_alternatingItemColors_test/bin/main.html" width="100%" height="200"></iframe></p>
<p>You can also set the alternatingItemColors style using an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following snippet:</p>
<pre class="code">
&lt;mx:Style&gt;
    HorizontalList {
        alternatingItemColors: #FFFFFF, #EEEEEE;
    }
&lt;/mx:Style&gt;
</pre>
<p>Or, you can set the style using ActionScript, as seen in the following snippet:</p>
<pre class="code">
&lt;mx:Script&gt;
    &lt;![CDATA[
        import mx.events.FlexEvent;

        private function horizontalList_initialize(evt:FlexEvent):void {
            horizontalList.setStyle("alternatingItemColors", [0xFFFFFF, "#EEEEEE"]);
        }
    ]]&gt;
&lt;/mx:Script&gt;

&lt;mx:HorizontalList id="horizontalList"
        dataProvider="{arr}"
        columnCount="3"
        columnWidth="175"
        rowCount="1"
        height="100"
        initialize="horizontalList_initialize(event);" /&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting alternating colors on a Flex HorizontalList control on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/',contentID: 'post-420',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'alternatingItemColors',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/01/04/setting-alternating-colors-on-a-flex-horizontallist-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the background alpha of a HorizontalList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 03:53:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[backgroundAlpha]]></category>
		<category><![CDATA[backgroundColor]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can change the background fill alpha on a HorizontalList control in Flex by setting the backgroundAlpha style.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_backgroundAlpha_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" creationComplete="init();"&#62; &#60;mx:Style&#62; Application { backgroundGradientColors: red, black; } &#60;/mx:Style&#62; &#60;mx:Script&#62; &#60;![CDATA[ [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can change the background fill alpha on a HorizontalList control in Flex by setting the <code>backgroundAlpha</code> style.</p>
<p>Full code after the jump.</p>
<p><span id="more-421"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_backgroundAlpha_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();"&gt;

    &lt;mx:Style&gt;
        Application {
            backgroundGradientColors: red, black;
        }
    &lt;/mx:Style&gt;

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

            private function init():void {
                slider.value = horizontalList.getStyle("backgroundAlpha");
            }

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

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="Accordion" /&gt;
        &lt;mx:Object label="ApplicationControlBar" /&gt;
        &lt;mx:Object label="Box" /&gt;
        &lt;mx:Object label="Canvas" /&gt;
        &lt;mx:Object label="ControlBar" /&gt;
        &lt;mx:Object label="DividedBox" /&gt;
        &lt;mx:Object label="Form" /&gt;
        &lt;mx:Object label="FormHeading" /&gt;
        &lt;mx:Object label="FormItem" /&gt;
        &lt;mx:Object label="Grid" /&gt;
        &lt;mx:Object label="HBox" /&gt;
        &lt;mx:Object label="HDividedBox" /&gt;
        &lt;mx:Object label="Panel" /&gt;
        &lt;mx:Object label="TabNavigator" /&gt;
        &lt;mx:Object label="Tile" /&gt;
        &lt;mx:Object label="TitleWindow" /&gt;
        &lt;mx:Object label="VBox" /&gt;
        &lt;mx:Object label="VDividedBox" /&gt;
        &lt;mx:Object label="ViewStack" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="backgroundAlpha:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0.0"
                        maximum="1.0"
                        liveDragging="true"
                        tickInterval="0.1"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:HorizontalList id="horizontalList"
            dataProvider="{arr}"
            backgroundAlpha="1.0"
            backgroundColor="haloSilver"
            columnWidth="175"
            columnCount="3"
            rowCount="1"
            rowHeight="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HorizontalList_backgroundAlpha_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/HorizontalList_backgroundAlpha_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the background alpha of a HorizontalList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/',contentID: 'post-421',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'backgroundAlpha,backgroundColor',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/01/04/changing-the-background-alpha-of-a-horizontallist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

