making treenodes readonly

G

Guest

Hi, I am adding nodes to a treeview and I wish for the text property of these
nodes
to be readonly. Intellisense doesn't seem to offer this property, Is it
possible to set a node to read only or failing that the whole tree.

Dim MyNode As New DirectoryNode(strProjectCode, strProjectKey, 12)
MyNode.Key = CType(ProjList(i).ProjectID, Integer)
'i need to set MyNode to readonly
node.Nodes.Add(MyNode)
Thanx in Advance

Geri
 
G

Guest

Geraldine,

I don't know about setting individual nodes to read-only but I have just
tried a TreeView and it is read-only by default. The only way I could find to
allow nodes to be modified was to set LabelEdit = True. May be check what
your LabelEdit is set to.

Chris.
 
H

Herfried K. Wagner [MVP]

Geraldine Hobley said:
I am adding nodes to a treeview and I wish for the text property of these
nodes to be readonly.

You can make all nodes read-only by setting their 'LabelEdit' property to
'False'.
 
H

Herfried K. Wagner [MVP]

Errata:
You can make all nodes read-only by setting their 'LabelEdit' property to
'False'.

.... should read "... by setting the treeview control's 'LabelEdit'
property...".
 

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

Top