Solved

Changing font color in tree

Posted on 2007-03-26
5
216 Views
Last Modified: 2012-05-05
I have a winform treeview with several treenodes.  In some of the nodes, I want to change the displayed text so that some words are black and others are gray.  Is there a way to apply multiple colors to a single node's text?
0
Comment
Question by:brettr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Desp
ID: 18798124
Use the BackColor, ForeColor and NodeFont Properties

treeView1.Nodes[0].ForeColor = Color.Gray;
treeView1.Nodes[1].ForeColor = Color.Blue;
treeView1.Nodes[2].NodeFont = new Font("Verdana", 10);
0
 

Author Comment

by:brettr
ID: 18799605
That seems to apply a single color to a single node.
0
 
LVL 19

Accepted Solution

by:
Desp earned 500 total points
ID: 18799860
sorry to misunderstood your question..

i think its not possible with the .net treeview control .. you have to write your own control and provide the feature.
0
 

Author Comment

by:brettr
ID: 18809783
I'm not sure how that would work either as you are still dealing with the same basic problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question