Treeview

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

Hi,

I created a treeview. I filled it with all the nodes I need. Now I would
like to deaktivate some nodes and activate them upon a given input.
"isvisible" is readonly. Isn't there any "enabled" property like the
textboxes have? If not, how can this be done?


Thanks,

Jerry
 
Define "deactivate". Does it mean that the node can't be selected, that it's
greyed, something else?

/claes
 
Yepp Claes, that's what I meant.

I want it to be greyed out and that it can't be selected. Eric has a nice
page where he does this with a workaround. I'll try it tonight. Is there
another way?

Thanks,

Jerry
 
The BeforeSelect event is the way to go, just as Eric writes in his article.
You can change the color with the TreeNode.ForeColor property (not sure if
Eric covered that in his article). Setting it to SystemColors.GrayText
should give you the correct gray text.

/claes
 

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