文档

Unity Engine

Unity Engine

TreeViewItem

The TreeViewItem is used to build the tree representation of a tree data structure.
阅读时间1 分钟最后更新于 1 个月前

Definition

警告
Removed. TreeViewItem is now deprecated. You can likely now use TreeViewItem\<int\> instead and not think more about it. But if you were using that identifier to store EntityId data, you should instead opt to upgrade your TreeViews to use TreeViewItem\<EntityId\> to get the proper typing.
public class TreeViewItem : TreeViewItem<int>, IComparable<TreeViewItem<int>>

Remarks

The TreeViewItem can be derived from to add custom data.
Additional Resources: TreeView.

Constructors

Constructor

Description

TreeViewItem()TreeViewItem constructor.
TreeViewItem(System.Int32)TreeViewItem constructor.
TreeViewItem(System.Int32,System.Int32)TreeViewItem constructor.
TreeViewItem(System.Int32,System.Int32,System.String)TreeViewItem constructor.

Properties

Property

Description

childrenThe list of child items of this TreeViewItem.
parentThe parent of this TreeViewItem. If it is null then it is considered the root of the TreeViewItem tree.

Methods

Method

Description

AddChildHelper method that adds the
child
TreeViewItem to the TreeViewItem.children list and sets the parent property on the
child
.

Inheritance