TreeView Control

Object List Hierarchy Next Object

Definition:

Use to display a hierarchical list of Node objects. Each node consists of a label and and optional bitmap.

Icon:images/Phx00222.gif

Specialized Features:


Properties Use to…


HideSelection Specify if the selected item is to lose its highlight when the TreeView control loses focus

ImageList Reference to the Imagelist object that is used for all the icon bitmaps drawn on the nodes of the TreeView.

Indentation Specifies the amount of indentation for the nodes.

LabelEdit Specifies whether or not interactive editing of the node labels is allowed.

LineStyle The style of the lines between the node object.

PathSeparator The delimiter string used for a nodes FullPath property.

RootNode The root node of the TreeView.

SelectedNode The currently selected node.

Sorted Whether the nodes should be sorted alphabetically.

Style Specifies what graphics (text, images, lines, plus/minus) that appear with each node.


Methods Use to…


AddNode Add a new node to the TreeView.

Clear Remove all nodes from the TreeView.

CollapseReset Collapse a particular node and remove all nodes that existed beneath it.

FindNode Find a node that matches a search string.

FindNodeUnderPoint Find the node that is located under the specified coordinates.

Nodes Retrieve the node associated with the specified key.

RemoveNode Remove a node from the TreeView.


Events Use to…


BeforeCollapseNode Define what ocurs when a node is about to collapse.

BeforeExpandNode Define what ocurs when a node is about to expand.

BeginLableEdit Prepare for editing the label of a node. This event can choose whether or not to deny the edit.

Click Perform an action when the user presses and releases a mouse button while on an object.

CollapseNode Define what ocurs when a node has collapsed.

DblClick Perform an action when the user presses and releases a mouse button twice in rapid succession over an object.

EndLabelEdit After the new text is entered, the event gets a chance to validate the input or change it.

ExpandNode Define what ocurs when a node has expanded.

NodeClick Define what ocurs when a new node has been selected (either with the mouse or with the keyboard).

Copied Features:

images/Phx00219.gif Properties images/Phx00220.gif Methods images/Phx00221.gif Events

Details:

The TreeView control can be used to display a hierarchical list of Node objects. Nodes are added via the AddNode method. You can specify an ImageList that contains the images to be used for the various node.