colored hierarchy levels in treeview

Posted on 2006-05-16
Last Modified: 2010-04-16
Hello experts!

I would like to achieve colored logical hierarchy blocks in the standard MS treeview as you can see in the "British cars" example below:

Is that possible with reasonable effort? This is the only special functionality I need, the rest of standard treeview is ok forme.

I would be very happy, if you could post code how to do that!

Thank you very much in advance!

Question by:i-Thomas
    1 Comment
    LVL 11

    Accepted Solution

    to change:
     the text color an background is very easy... just set the forecolor and backcolor on the treenode object you want
     the image may be set using imageindex (also on the treenode object)
     the font use font property of the treenode

    this is the easy part.

    to do more customisation you will need to implement a custom draw tree view


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now