SlideShare a Scribd company logo
Tree Control Hemakumar.S Open Source Developer
Creating a Tree control   Define a Tree control in MXML by using the <mx:Tree> tag.  The Tree control normally gets its data from  XML structure Array Collection or XMLListCollection.
DefaultDataDescriptor class   Collections   A collection implementation, such as an XMLListCollection or ArrayCollection object. The DefaultDataDescriptor class includes code to handle collections efficiently. Always use a collection as the data provider if the data in the menu changes dynamically; otherwise the Tree control might display obsolete data. XML   A string containing valid XML text, or any of the following objects containing valid E4X format XML data: <mx:XML> or <mx:XMLList> compile-time tag, or an XML or XMLList object. Other objects  An array of items, or an object that contains an array of items, where a node's children are contained in an item named children.
Sample Program The DefaultDataDescriptor class also supports using an <mx:Model> tag as a data provider for a menu, but all leaf nodes must have the name children; As a general rule, it is a better programming practice to use the <mx:XML> or <mx:XMLList> tags when you need a Tree data provider that uses binding. Example: <?xml version=&quot;1.0&quot;?> <!-- dpcontrols/TreeSimple.mxml -->  <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;>  <mx:Tree id=&quot;tree1&quot; labelField=&quot;@label&quot; showRoot=&quot;true&quot; width=&quot;160&quot;> <mx:XMLListCollection id=&quot;MailBox&quot;>  <mx:XMLList> <folder label=&quot;Mail&quot;>  <folder label=&quot;INBOX&quot;/>  <folder label=&quot;Personal Folder&quot;>
Cont…. <Pfolder label=&quot;Business&quot; />  <Pfolder label=&quot;Demo&quot; />  <Pfolder label=&quot;Personal&quot; isBranch=&quot;true&quot; />  <Pfolder label=&quot;Saved Mail&quot; />  </folder> <folder label=&quot;Sent&quot; />  <folder label=&quot;Trash&quot; />  </folder> </mx:XMLList>  </mx:XMLListCollection>  </mx:Tree>  </mx:Application>
Screen Shot
Thank You

More Related Content

PPT
Using xml in a data set (ado.net)
PPT
Acutate - Using Stored Procedure
PDF
ASP.NET- database connectivity
PPTX
Database connectivity in asp.net
PPTX
PPTX
Computation systems for protecting delimited data
PPT
Ppt lesson 12
PPTX
Database connectivity to sql server asp.net
Using xml in a data set (ado.net)
Acutate - Using Stored Procedure
ASP.NET- database connectivity
Database connectivity in asp.net
Computation systems for protecting delimited data
Ppt lesson 12
Database connectivity to sql server asp.net

Viewers also liked (18)

PPT
Pop up menubutton control
PPT
Health heart1 hemakumar
PPT
Horizontal list
PPT
Expanding a tree node
DOCX
Tabulasi gerak harmonik sederhana2
PPT
Linux commands
PPT
Image control
DOCX
Tabulasi gerak harmonik sederhana
PPT
Tree user interaction
PPTX
Wow Ppt With Numbers
PPTX
Wow Mobile Presentationsuccessstry
PPT
Specifying tree control icons
DOC
PPT
Drag and drop
PPT
Linux commands
PPT
Navigation keys in tree controls
PPT
Combobox with effect
PPS
Northrop Grumman\'s X 47 B1
Pop up menubutton control
Health heart1 hemakumar
Horizontal list
Expanding a tree node
Tabulasi gerak harmonik sederhana2
Linux commands
Image control
Tabulasi gerak harmonik sederhana
Tree user interaction
Wow Ppt With Numbers
Wow Mobile Presentationsuccessstry
Specifying tree control icons
Drag and drop
Linux commands
Navigation keys in tree controls
Combobox with effect
Northrop Grumman\'s X 47 B1
Ad

More from Hemakumar.S (6)

PDF
Reading123
DOC
PPT
Pop upbutton control
PPT
Tile list
PPT
List control
PPT
Handling tree control events
Reading123
Pop upbutton control
Tile list
List control
Handling tree control events
Ad

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
project resource management chapter-09.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Mushroom cultivation and it's methods.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
A novel scalable deep ensemble learning framework for big data classification...
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative analysis of optical character recognition models for extracting...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
1 - Historical Antecedents, Social Consideration.pdf
project resource management chapter-09.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Mushroom cultivation and it's methods.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Web App vs Mobile App What Should You Build First.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Encapsulation theory and applications.pdf
Hindi spoken digit analysis for native and non-native speakers

Tree control

  • 1. Tree Control Hemakumar.S Open Source Developer
  • 2. Creating a Tree control Define a Tree control in MXML by using the <mx:Tree> tag. The Tree control normally gets its data from XML structure Array Collection or XMLListCollection.
  • 3. DefaultDataDescriptor class Collections   A collection implementation, such as an XMLListCollection or ArrayCollection object. The DefaultDataDescriptor class includes code to handle collections efficiently. Always use a collection as the data provider if the data in the menu changes dynamically; otherwise the Tree control might display obsolete data. XML   A string containing valid XML text, or any of the following objects containing valid E4X format XML data: <mx:XML> or <mx:XMLList> compile-time tag, or an XML or XMLList object. Other objects  An array of items, or an object that contains an array of items, where a node's children are contained in an item named children.
  • 4. Sample Program The DefaultDataDescriptor class also supports using an <mx:Model> tag as a data provider for a menu, but all leaf nodes must have the name children; As a general rule, it is a better programming practice to use the <mx:XML> or <mx:XMLList> tags when you need a Tree data provider that uses binding. Example: <?xml version=&quot;1.0&quot;?> <!-- dpcontrols/TreeSimple.mxml --> <mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;> <mx:Tree id=&quot;tree1&quot; labelField=&quot;@label&quot; showRoot=&quot;true&quot; width=&quot;160&quot;> <mx:XMLListCollection id=&quot;MailBox&quot;> <mx:XMLList> <folder label=&quot;Mail&quot;> <folder label=&quot;INBOX&quot;/> <folder label=&quot;Personal Folder&quot;>
  • 5. Cont…. <Pfolder label=&quot;Business&quot; /> <Pfolder label=&quot;Demo&quot; /> <Pfolder label=&quot;Personal&quot; isBranch=&quot;true&quot; /> <Pfolder label=&quot;Saved Mail&quot; /> </folder> <folder label=&quot;Sent&quot; /> <folder label=&quot;Trash&quot; /> </folder> </mx:XMLList> </mx:XMLListCollection> </mx:Tree> </mx:Application>