TreeView 中节点拖动、增加、删除等功能演示
The purpose of the TreeView example is to show developers some of the basics of using and manipulating the TreeView Control. The example shows how to add Nodes to the control using the five different relationship settings of the Nodes Collection Add Method. It will also allow you to remove a selected Node or branch.
The main focus of the example is to show how to save and restore the Nodes into an Access Database. The algorithm used saves the Nodes in viewing order. This allows you to save and restore the TreeView Control with the Nodes in the same order as the user was viewing them when they closed the application.
The sample also shows dragging and dropping of Nodes. It allows you to drag a Node and drop it on top of a different Node so that the dragged Node is now the child of the Node it was dropped on.
For more information on the TreeView Control please see On-line help and/or the Visual Basic Component Tools Guide.
To use this sample open the Treeview.vbp in the VB IDE
Then press the F5 key or choose Start from the Run menu
Files included with this sample are
Readme.txt
Treeview.vbp
Bldtree.frm
Bldtree.frx
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS
SAMPLE IS AT YOUR OWN RISK. Microsoft provides this code
"as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and/or fitness
for a particular purpose.
- 1
- 2
- 3
前往页