Treeview Control

  • Thread starter Thread starter Larry Pits
  • Start date Start date
L

Larry Pits

Hi All,

I tried to add a treeview control onto my windows Form and I set the name of
the treeview to otree1 and id to oletreeview1. In the test.aspx.vb, I want
to add nodes to the tree and I am struck and confused. It's not the same a
the old Visual Basic. Could someone help me out? TIA
 
You can add nodes to the treeview at design time through the property page
item "Nodes". Then, once you've added a few items there, you can look at
the code generated by VS and see how it works. I assume you wanted to do
this for a winform, since there isn't a built-in tree control for
webforms...

Basically, what you want to do is add new System.Windows.Forms.TreeNode()s
to the TreeView1.Nodes.Add() method. You can also add nodes to the
TreeNode()s which will add the various levels to your tree.

HTH.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
Back
Top