TreeDataProvider.addTreeNode()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
Usage 1:
someNode.addTreeNode(label, data)
Usage 2:
someNode.addTreeNode(child)
Parameters
A string that displays the node.
label
An object of any type that is associated with the node.
data
Any XMLNode object.
child
Returns
The added XML node.
Description
Method; adds a child node at the root of the tree. The node is constructed either from the
information supplied in the
node, which is an XMLNode object (Usage 2). Adding a preexisting node removes the node from
its previous location.
Calling this method refreshes the display of the tree.
Example
The first line of code in the following example locates the node to which to add a child. The
second line adds a new node to a specified node.
var myTreeNode = myTreeDP.firstChild.firstChild;
myTreeNode.addTreeNode("Inbox", 3);
The following code moves a node from one tree to the root of another tree:
myTreeNode.addTreeNode(mySecondTree.getTreeNodeAt(3));
788
Chapter 6: Components Dictionary
and
parameters (Usage 1), or from the prebuilt child
label
data
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?