TreeNode Selected Item Color

  • Thread starter Thread starter Ian Semmel
  • Start date Start date
I

Ian Semmel

How do you change the color of the selected item (ie clicked) in a
TreeView control ?
 
When you click node its back color is changed for you automatically by the
control. If you mean persistent change of color, probably you need to handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?
How do you change the color of the selected item (ie clicked) in a TreeView
control ?
 
From: AlexS [mailto:[email protected]]

When you click node its back color is changed for you automatically by
the
control. If you mean persistent change of color, probably you need to
handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?

Well, it would be something like SelectedNodeBackColor if there were
such an animal
 
The you can use TreeNode.BackColor property

Does it work for you?

Ian Semmel said:
From: AlexS [mailto:[email protected]]

When you click node its back color is changed for you automatically by
the
control. If you mean persistent change of color, probably you need to
handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?

Well, it would be something like SelectedNodeBackColor if there were
such an animal

How do you change the color of the selected item (ie clicked) in a
TreeView
control ?
 

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