treeview nodes

  • Thread starter Thread starter Hrvoje Voda
  • Start date Start date
H

Hrvoje Voda

I made my own user treeview control.
Now, I can't access the method treeview.Nodes !
Why?


Hrcko
 
You need to expose the Treeview.Nodes collection of the Treeview as a public
property of your user control.

DalePres
MCAD, MCDBA, MCSE
 
How?

Hrcko

DalePres said:
You need to expose the Treeview.Nodes collection of the Treeview as a
public property of your user control.

DalePres
MCAD, MCDBA, MCSE
 
In your user control:

public TreeNodeCollection Nodes
{
get { return myTreeView.Nodes; }
set { myTreeView.Nodes = value; }
}

In your control consumer:

TreeviewNode node = myUserControl.Nodes[intIndex];

HTH

DalePres
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top