The Tree control in Adobe Flex
The Tree control is much like the folder explorer feature of window. It helps us to explore the folders without moving inside to each folder, we can see the list of folders and files of each folder by clicking the folder icon.
Each folder is called node, it could be leaf (i.e. it does not contain any files or folders) or branch (i.e. it has files and folders).
In general hierarchical data provider, such as XML, provides the data. We should use ArrayCollection and XMLListCollection object if the data of the Tree is dynamic in nature.
DefaultDataDescriptor (Default descriptor data of tree to parse and manipulate data) class supports the following data types:
Flex Tree Component Example 1:ong>
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel><mx:Tree labelField="@label" showRoot="true"> <mx:XMLListCollection> <mx:XMLList xmlns=""> <folder label="Message"> <folder label="create"/> <folder label="sent items"/> <folder label="inbox"/> <folder label="draft"/> <</folder> </mx:XMLList> </mx:XMLListCollection> </mx:Tree>
Posted on: January 23, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles