Change color and font of CTreeCtrl item.

Posted on 2003-11-10
Last Modified: 2013-12-03
Please let me know if there is a way to change color and font of CTreeCtrl item. Tree control is pu on the view (not in dialog).

The similar qiestion is how to make tree control item disabled.

Thanks in advance

Question by:sergtr
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
  • 3
  • 2
LVL 44

Expert Comment

ID: 9715211
A tree control has functions SetTextColor and SetBkColor.  Are they not suitable?
LVL 11

Expert Comment

ID: 9715330
If the built in functions don't offer enough control, perhaps something more like this: would work?

Hope this helps.

Author Comment

ID: 9715817
SetTextColor and SetBkColor methods are related to whole CTreeCtrl but the question is regarding to certain item...  is example, which doesn't work in a view properly.


Industry Leaders: 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!

LVL 11

Expert Comment

ID: 9715908
Create a CCtrlView and put the alternative tree control on that.

Author Comment

ID: 9715930
It's exactly that has been done... unfortuantely it doesn't work properly...

LVL 11

Accepted Solution

KurtVon earned 250 total points
ID: 9715957
What doesn't work?  Post the code you wrote and maybe it can be figured out.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

756 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