Home Tutorial Flex Flex4 Components HorizontalList Control in Flex4

 
 

Share on Google+Share on Google+
HorizontalList Control in Flex4
Posted on: May 31, 2010 at 12:00 AM
Advertisement
The HorizontalList control is a MX component. There is no spark component.

HorizontalList control in Flex4:

The HorizontalList control is a MX component. There is no spark component. The HorizontalList control displays the items in horizontal manner. You can display a list of items and images in it. The items will be displayed from left to right. It looks like a HBox control. The HorizontalList control contains horizontal scrolling. You can use Actionscript or fx Array for providing a data to the HorizontalList control by dataprovider property. The tag of this control is <mx:HorizontalList>.

Example:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx"

minWidth="955" minHeight="600">

<s:Panel title="HorizontalList Control in Flex4" width="410" height="213">

<mx:HorizontalList id="hlist"

height="151"

color="0x323232"

columnWidth="100"

columnCount="3"

width="380"

x="13"

y="15">

<mx:dataProvider>

<fx:Array>

<fx:Object label="Java"

icon="@Embed('C:/work/bikrant/flex4component/horizontallist/java.jpg')"/>

<fx:Object label="iphone"

 icon="@Embed('/C:/work/bikrant/flex4component/horizontallist/iphone.gif')"/>

<fx:Object label="PHP"

icon="@Embed('/C:/work/bikrant/flex4component/horizontallist/php.jpg')"/>

<fx:Object label="HTML"

icon="@Embed('/C:/work/bikrant/flex4component/horizontallist/html.png')"/>

<fx:Object label="Flex"

icon="@Embed('/C:/work/bikrant/flex4component/horizontallist/flex.jpg')"/>

</fx:Array>

</mx:dataProvider>

</mx:HorizontalList>

</s:Panel>

&</s:Application>

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Advertisement

Related Tags for HorizontalList Control in Flex4:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: May 31, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com