Adobe 65036570 - Director - PC User Manual page 247

User guide
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

<node>
<node label="Mail">
<node label="INBOX"/>
<node label="Personal Folder">
<node label="Business" isBranch="true" />
<node label="Demo" isBranch="true" />
<node label="Personal" isBranch="true" />
<node label="Saved Mail" isBranch="true" />
<node label="bar" isBranch="true" />
</node>
<node label="Sent" isBranch="true" />
<node label="Trash"/>
</node>
</node>
Note: The
attribute is read-only; you cannot set it directly. To set it, call the
isBranch
Nodes in the XML data source can have any name. Notice that in the sample each node is named with the generic
name node. The tree reads through the XML and builds the display hierarchy based on the nested relationship of the
nodes.
Each XML node can be displayed as one of two types in the Tree: branch or leaf. Branch nodes can contain multiple
child nodes and appear as a folder icon with a disclosure triangle that allows users to open and close the folder. Leaf
nodes appear as a file icon and cannot contain child nodes. Both leaves and branches can be roots; root nodes appear
at the top level of the tree and have no parent.
There are many ways to structure XML. The Tree component is not designed to use all types of XML structures, so
it's important to use XML that the Tree component can interpret. Do not nest node attributes in a child node. Each
node should contain all its necessary attributes. The attributes of each node should be consistent to be useful. For
example, to describe a mailbox structure with a Tree component, use the same attributes on each node (message,
data, time, attachments, and so on). This allows the tree to know what it expects to render, and allows you to loop
through the hierarchy to compare data.
When a Tree displays a node it uses the
exist, they become additional properties of the node's attributes within the Tree.
The actual root node is interpreted as the Tree component itself. This means that the
), is rendered as the root node in the Tree view. This means that a tree can have multiple root
<node label="Mail">
folders. In this sample, there is only one root folder displayed in the tree: "Mail". However, if you were to add sibling
nodes at that level in the XML, multiple root nodes would be displayed in the Tree.
Tree parameters
You can set the following authoring parameters for each Tree component instance in the Property inspector.
multipleSelection a Boolean value that indicates whether a user can select multiple items (
The default value is false.
rowHeight the height of each row in pixels. The default value is 20.
Write Lingo or JavaScript to control these and additional options for the Tree component by using its properties,
methods, and events.
Unlike with other components, you cannot enter data parameters in the Property inspector for the Tree component.
attribute of the node by default as the text label. If any other attributes
label
ADOBE DIRECTOR 11.0
method.
Tree.setIsBranch()
(in the sample,
firstChild
) or not (
true
false
236
User Guide
).

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents