Flex 2.0 ItemRenderers

Mixing it all together
Nathan Daniel
A web developer specializing in web services and integration. Along with HTML & PHP development, Nathan also develops RIAs utilizing Flex 2.0 and Flash!
Online portfolio and website can be seen at http://flex2.bsi-scs.com.Â
The final step is to implement your new component. Open source view of the main application and replace labelField="label" with itemRenderer="ListItem" (ListItem is the name of my component I created, if you named your something different, it should be changed to match the name of your component).
From:
<mx:List id="myList" dataProvider="{myArray}" labelField="label" width="200" left="10" top="10"/>
To:
<mx:List id="myList" dataProvider="{myArray}" itemRenderer="ListItem" width="200" left="10" top="10"/>
That's it! Run your application and your list items will now be your new component!
The beauty of the ItemRenderer is it can be used in ALL list based components - List, TileList, ComboBox, etc. Using the ItemRenderer, you can change a ComboBox component to include more than just text as a choice - it can be an image! Great for a product catalog or anything else you could image!
Spread The Word
4 Responses to "Flex 2.0 ItemRenderers" 
|
said this on 04 May 2007 1:06:18 AM CST
great tutorial... but I d
|
|
said this on 30 Aug 2007 4:07:57 PM CST
Say I use an itemRenderer
|
|
said this on 10 Jan 2008 2:40:02 AM CST
the syntax of the display
. It cost nerves to fin |
|
said this on 15 May 2008 10:21:50 AM CST
Is there a way of knowing
|



Author/Admin)