VB.NET : Creating a tree-like explorer in an application

07-06-2006, 10:49 PM
I am using Visual Studio 2005. I want to make a windows application with an explorer on the left (tree-like structure), similar to the one in the screenshot attached . The screenshot is from SQL Server. The list of items to be added will be dynamically generated. I also want to do the same on a web site. How do I go about doing this in VB.NET?

07-07-2006, 11:26 AM
Well, start off by adding a TreeView control to your form. Then, you will want to add an ImageList control. The image list control will contain the icons for the tree nodes. Add your icons to the ImageList in the properties window. Now, set the ImageList property of the TreeView to your ImageList control that you added.

As far as populating the data, MSDN has examples of the basics of the TreeView control. This article (http://www.codeproject.com/vb/net/DragDrop.asp), while explaining drag-and-drop, has some code that may help you while you are trying to get your TreeView to "do stuff."

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum