Solved

Change color and font of CTreeCtrl item.

Posted on 2003-11-10
8
1,510 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA "SendKeys" Syntax for Multiple Keystrokes 7 108
Doc'in system (example?) BA 7 109
abstract class with all non abstract mentods 6 76
Capture logon name 13 70
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…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…

776 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