colored hierarchy levels in treeview

Posted on 2006-05-16
Medium Priority
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

Agarici earned 2000 total points
ID: 16697172
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

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

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

809 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