Share on Google+Share on Google+
Tree in Flex
Posted on: January 23, 2010 at 12:00 AM
Advertisement
Tutorial Tree in Flex will illustrate various features of Tree, 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. Example will helps you to learn it more preciesely.

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:

  • Collections
  • XML
  • Other Objects

Flex Tree Component Example 1:ong>

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

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<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>

</mx:Panel>

</mx:Application>

 

Output:trong>

Advertisement

Related Tags for Tree in Flex:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 23, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com