TreeView Control

This control is a hierarchical display of labeled items.

Library Name

MSCETREEVIEWLibCtl

DLL Name

Mscetreeview.dll

The TreeView control supports the following properties:

FontBold HideSelection Nodes
FontItalic ImageList PathSeparator
FontName Indentation SelectedItem
FontSize LabelEdit Sorted (TreeView)
FontStrikethrough LineStyle Style (TreeView)
FontUnderline    

The TreeView control supports the following methods:

The TreeView control supports the following events:

Remarks

Items in a TreeView are called Node objects, each of which consists of a label and an optional bitmap. You can add, manipulate, and remove Node objects by setting properties and invoking methods. You also can programmatically expand and collapse Node objects to display or hide any subitems contained in the node. These subitems are called child nodes.

Node objects appear in one of eight combinations of text, bitmaps, lines, and plus/minus signs. To change the appearance of a node, set the Style property for the node.

To navigate through a tree in code, retrieve a reference to its Node object using the Root, Parent, Child, FirstSibling, Next, Previous, or LastSibling properties.

To add a bitmap to a Node, the TreeView control uses the ImageList control, which stores the bitmaps and icons that are displayed in the Node object. A TreeView control can use only one ImageList control at a time, so every item in the TreeView control will have an equal-sized image next to it. To specify an ImageList control, use the ImageList property.