class TreeItem
An item in a TreeView.
Syntax
[<oRef> =] new TreeItem(<parent> [,<name expC>])
<oRef>
A variable or property—typically of <parent>—in which to store a reference to the newly created TreeItem object.
<parent>
The parent object—a TreeView object for top-level items, or another TreeItem—to which you’re binding the TreeItem object.
<name expC>
An optional name for the TreeItem object. If not specified, the TreeItem class will auto-generate a name for the object.
Properties
The following tables list the properties and methods of interest in the TreeItem class. (No particular events are associated with this class.)
| Property | Default | Description | 
| TREEITEM | Identifies the object as an instance of the TreeItem class | |
| false | Whether the text label is bold | |
| false | Whether the item is visually marked as checked | |
| (TREEITEM) | Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName | |
| false | Whether the item’s children are shown or hidden | |
| 
 | The first child tree item | |
| 
 | The Windows tree item handle (similar to hWnd) | |
| 
 | Image displayed between checkbox and text label when item does not have focus | |
| 
 | The tree level of the item | |
| 
 | The next tree item with the same parent | |
| 
 | The number of child tree items | |
| 
 | The previous tree item with the same parent | |
| 
 | Image displayed between checkbox and text label when item has focus | |
| 
 | The text label of the tree item 
 | |
| Method | Parameters | Description | 
| 
 | Expands the tree and scrolls the tree view if necessary to make the tree item visible | |
| 
 | Makes the tree item the selected item in the tree | |
| 
 | Expands the tree and scrolls the tree view if necessary to try to make the tree item the first (topmost) visible tree item | |
| 
 | Sorts the child tree items 
 | 
The following table lists the common properties, events, and methods of the TreeItem class:
| Property | 
 | Event | 
 | Method | 
| 
 | 
 | 
Description
Each item in a tree view can contain text, an icon image that can change when the item is selected, and a checkbox. You can replace the checkbox images with a different pair of images to represent any two-state condition.
A TreeItem object can contain other TreeItem objects as child objects in a subtree, which can be expanded or collapsed.