Search Flex Components Free

Custom Search

December 25, 2007

Flex Cell Renderers Control Custom Class Source Code

Flex Sample Source Code:
CustomCellRanderDemo.mxml

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

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="srv.send()" backgroundAlpha="0">

<mx:HTTPService id="srv" url="../assets/catalog.xml" useProxy="false"/>

<mx:List dataProvider="{srv.lastResult.catalog.product}" height="100%" width="200"
itemRenderer="Thumbnail" rowHeight="125"/>

</mx:Application>

Thumbnail.mxml

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

<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
width="165" height="120" verticalAlign="middle" verticalGap="0" verticalScrollPolicy="off">

<mx:CurrencyFormatter id="cf"/>

<mx:Image id="img" height="100" width="50" source="../{data.image}"/>

<mx:VBox width="100%" paddingTop="0" horizontalGap="4">
<mx:Label text="{data.name}" fontWeight="bold"/>
<mx:Label text="{cf.format(data.price)}" fontWeight="bold"/>
</mx:VBox>

</mx:HBox>

Related Flex Tutorials