The basic function of a TreeNode control.
Type | Description | |
alwaysShowChevron | Boolean |
if true, chevron will be always shown even if it has no child at all. |
child | Array |
Array of _TreeNodeBase Object which represent child of this node. |
expand | Boolean |
if true, node will expand to display the children. |
state | Object |
value of tree node, this is user-specific and can be anything. |
state | String |
state of tree node. State is developer-specific and can be any string. For example, TreeCheckBox has 3 states : "check", "uncheck", "halfcheck". |
title | String |
title of tree node. |
Return type | Description | |
add(TreeNodeindex) | None |
add child to this node at specific position. |
append(_TreeNodeBase) | None |
append child to this node. |
appendDomNode(domNode) | None |
append domNode to this tree. |
getParent() | Object |
get parent of this node. Return null if it has no parent. |
remove(index) | None |
remove child from this node. |
removeAll() | None |
remove all children from this node. |
removeAllDetailsNodes() | None |
remove all details nodes from this node. |
removeDetailsNode(domNode) | None |
remove details node from this node. |
Description | ||
child-state-change (childNode, oldState, state) |
The event fires when child state of this tree node is changed. |
|
collapse |
The event fires when tree node is collapse. |
|
expand |
The event fires when tree node is expand. |
|
state-change (oldState, state) |
The event fires when tree node state is changed. |
state of tree node. State is developer-specific and can be any string. For example, TreeCheckBox has 3 states : "check", "uncheck", "halfcheck".
add child to this node at specific position.
<_TreeNodeBase Object>
TreeNode
|
Required |
object you want to add as a child of this node. |
<Number>
index
|
Required |
position you want to locate this child (index start at 0). index = 0 means it will be the first child of this node. |
append child to this node.
<_TreeNodeBase Object>
_TreeNodeBase
|
Required |
object you want to add as a child of this node. |
append domNode to this tree.
<DOMNode>
domNode
|
Required |
you want to add to this tree. |
remove child from this node.
<Number>
index
|
Required |
position of child you want to remove (index start at 0). index = 0 mean you want to remove first child. |
remove all children from this node.
remove all details nodes from this node.
remove details node from this node.
<DOMNode>
domNode
|
Required |
you want to remove to this tree. |
The event fires when child state of this tree node is changed.
The event fires when tree node is collapse.
The event fires when tree node is expand.