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
Solved

Change color and font of CTreeCtrl item.

Posted on 2003-11-10
8
1,521 Views
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

Sergei
0
Comment
Question by:sergtr
  • 3
  • 2
8 Comments
 
LVL 44

Expert Comment

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

Expert Comment

by:KurtVon
ID: 9715330
If the built in functions don't offer enough control, perhaps something more like this: http://www.codeproject.com/treectrl/colortreectrl.asp would work?

Hope this helps.
0
 

Author Comment

by:sergtr
ID: 9715817
SetTextColor and SetBkColor methods are related to whole CTreeCtrl but the question is regarding to certain item...
http://www.codeproject.com/treectrl/colortreectrl.asp  is example, which doesn't work in a view properly.

Thanks,

Sergei
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 11

Expert Comment

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

Author Comment

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

Thanks,
Sergei
0
 
LVL 11

Accepted Solution

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…

828 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