TreeView - disable or hide node

  • Thread starter Thread starter meska
  • Start date Start date
M

meska

Hi all

is there a way in a treeview to hide or disable node without reloading the
tree or removing the node? I meen if i could programaticly set the node to
be disabled ( grayed out, user cannot select that node) or hide it ( user
cannot see the node, but node is physically there ?)
 
Hi,

There is a "BeforeSelect" event with argument that provides
the selection's cancel.

To provide any "enabling" style you should look for TreeNode
properties like: BackColor, ForeColor, NodeFont, ImageIndex.

Cheers!

Marcin
 
thanx !
Marcin Grzêbski said:
Hi,

There is a "BeforeSelect" event with argument that provides
the selection's cancel.

To provide any "enabling" style you should look for TreeNode
properties like: BackColor, ForeColor, NodeFont, ImageIndex.

Cheers!

Marcin
 
Correct!

Like a .NET docs says, there is no way to hide or
disable the "TreeNode".
Only what you can do is changing its "style".
None of that can "hide" a node - correct?

The old trick with setting "ForeColor" to "BackColor"
can hide the Text, but i don't recomend it in the "TreeView".

Regards

Marcin
 
Back
Top