Loading a treeview with objects

ahbenshaut

Well-known member
Joined
Oct 29, 2004
Messages
62
Location
Alaska
Programming Experience
5-10
Is is possible to load objects into a treeview? I know it can be done with a combo box but I haven't been able to find any code snippets that show how to do this with a treeview.
I am using Visual Studio 2005

Any help would be greatly appreciated
 
ComboBox.Items is a ObjectCollection, TreeView.Nodes is a TreeNodeCollection which represents a collection of TreeNode objects, so no, but you can store an object in each TreeNode.Tag property, this is Object type.
 
VB.NET:
dim tn as new treenode
tn.tag=new object
 
Back
Top