| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Mar 2006
Posts: 2
|
Hai..
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/fle...lexapp_12.html (it is flex1.5 tutorial) but its not working, maybe that type of function cannot be done in flex2.. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar 2006
Posts: 2
|
oppss.. I think I have pos at the wrong section.. sorry..
|
|
|
|
|
|
|
|
|
#3 |
|
Addict
Join Date: Nov 2001
Location: London
Posts: 2,128
|
http://livedocs.macromedia.com/labs/...rols/List.html
check there the the Flex 2.0 docs on the List component |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 2006
Location: Rhode Island
Posts: 51
|
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.
Code:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the List Control -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
[Bindable]
[Embed(source="FlexLogo.gif")]
public var iconSymbol1:Class;
[Bindable]
[Embed(source="shockwave.gif")]
public var iconSymbol2:Class;
[Bindable]
[Embed(source="breeze.png")]
public var iconSymbol3:Class;
[Bindable]
[Embed(source="flash.png")]
public var iconSymbol4:Class;
]]>
</mx:Script>
<mx:Panel title="List Panel" paddingTop="10">
<mx:List id="SoftwareSelection" width="280">
<mx:dataProvider>
<mx:Array>
<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 }"/>
</mx:Array>
</mx:dataProvider>
</mx:List>
</mx:Panel>
</mx:Application>
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Major Problems trying to capture "click" event in List component | ManinBlaq | Components | 11 | 01-30-2007 08:12 PM |
| List Component Double-Click | Fuzzplug Jones | Components | 3 | 04-18-2006 11:10 PM |
| Extending List Component | actionscriptLearner | Components | 2 | 01-07-2006 12:46 AM |
| 2 Part Question: Tooltips for List Component . Word Wrap for List Component | FaceEraser | Components | 0 | 09-12-2005 02:13 PM |
| using the List component in my class?? | dangerhotrod | Components | 5 | 11-18-2004 08:34 AM |