View Full Version : flex2 - List Component

03-10-2006, 02:11 AM
I'm new user here..

I have try to develop my first application, but I have a problem with list component..

How do I add item/data to list component by using AS3.0?
In AS2.0 we using ListCompName.addItem(myData1,..);

I refer to this site as my first tutorial --> http://www.macromedia.com/devnet/flex/articles/first_flexapp_12.html
(it is flex1.5 tutorial) but its not working, maybe that type of function cannot be done in flex2..

03-10-2006, 02:20 AM
oppss.. I think I have pos at the wrong section.. sorry..

03-13-2006, 10:21 AM

check there the the Flex 2.0 docs on the List component

03-30-2006, 04:49 PM
I am far from an expert, but I did find this code. If I understand these components correvctly, the list needs to be tied to a data provider, which can be as simple as a container like an array.

<?xml version="1.0"?>

<!-- Simple example to demonstrate the List Control -->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">


public var iconSymbol1:Class;

public var iconSymbol2:Class;

public var iconSymbol3:Class;

public var iconSymbol4:Class;


<mx:Panel title="List Panel" paddingTop="10">

<mx:List id="SoftwareSelection" width="280">

<mx:Object label="Macromedia Flex" icon="{ iconSymbol1 }"/>
<mx:Object label="Macromedia Shockwave" icon="{ iconSymbol2 }"/>
<mx:Object label="Macromedia Breeze" icon="{ iconSymbol3 }"/>
<mx:Object label="Macromedia Flash" icon="{ iconSymbol4 }"/>