TreeView Control Properties in VB.NET
How to use the TreeView Control Properties in VB.NET?
Explanation
Tree View Control Properties
Following table lists the Properties, Events, Methods used commonly with the Tree View Control in Visual Basic.net 2008.
Properties:
Properties |
Description |
BorderStyle |
Property used to Get or set the tree views border style. |
CheckBoxes |
Property used to set or get whether the checkboxes be displayed next to tree nodes. |
FullRowSelect |
Property used to set or get whether the selection should select the whole width of a treeview. |
HideSelection |
Property used to get or set whether the selected tree node stays highlighted when the tree view looses focus. |
HotTracking |
Property used to get or set whether the tree node changes appearance on mouse over. |
ImageIndex |
Property used to get or set image list index of the current image. |
ImageList |
Property used to get or set image list used with this tree view. |
Indent |
Property used to get or set the distance that each level should be indented. |
ItemHeight |
Property used to get or set the height of the tree nodes. |
LabelEdit |
Property used to get or set whether the tree note text can be edited. |
Nodes |
Property used to get a collection of tree nodes. |
PathSeperator |
Property used to get or set the string the tree node uses as a path delimiter. |
Scrollable |
Property used whether to display scroll bars or not. |
SelectedImageIndex |
Property used to get or set an image index for an image to display when a node is selected. |
SelectedNode |
Property used to get or set the selected node. |
ShowLines |
Property used to get or set whether the lines need to be drawn between the nodes. |
ShowPlusMinus |
Property used to get or set whether plus or minus button need to be shown near the tree nodes with the child tree. |
ShowRootLines |
Property used to get or set whether lines should be drawn between the tree nodes and the root node. |
Sorted |
Property used to get or set whether the tree nodes should be sorted. |
TopNode |
Property used to get first visible node. |
VisibleCount |
Property used to get the number of nodes that can be seen currently. |
Methods:
Events |
Description |
BeginUpdate |
Disabled redrawing of the tree view. |
CollapseAll |
Collapse All nodes. |
EndUpdate |
Enables redrawing of the tree view. |
ExpandAll |
Expands all nodes. |
GetNodeAt |
Gets the node that is at the given location. |
GetNodeCount |
Gets the number of nodes. |
Events:
Events |
Description |
AfterCheck |
Triggered when a node checkbox is checked. |
AfterCollapse |
Triggers when a tree node is collapsed. |
AfterExpand |
Triggered when the tree node is expanded. |
AfterLabelEdit |
Triggers when the tree node label text is edited. |
AfterSelect |
Triggers when a tree node is selected. |
BeforeCheck |
Triggered before the a node checkbox is checked. |
BeforeCollapse |
Triggers before a node is collapsed. |
BeforeExpand |
Triggered before a node is expanded. |
BeforeLabelEdit |
Triggers before a node label text is edited. |
BeforeSelect |
Triggers before a node is selected. |
ItemDrag |
Triggers when an item s dragged into the tree view. |
Thus you can use the treeview control properties in an effective way.