Print Page | Close Window

CXTTreeCtrl : color of the focused text

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6001
Printed Date: 12 November 2025 at 3:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTTreeCtrl : color of the focused text
Posted By: gwoin
Subject: CXTTreeCtrl : color of the focused text
Date Posted: 05 January 2007 at 5:06am

Hi,

In a CXTTreeCtrl control, how to change the color of the focused text (the color when the mouse is over the item)?
For now it is a blue (0,0,255).
 
To change the color of the text, it's easy ( SetTexColor(COLORREF); ).
But I cannot find any function to change the color of the focused text.
If it's in the ini file of my skin, I cannot find where...
 
Any idea?
 
Thank you.



Replies:
Posted By: danpetitt
Date Posted: 05 January 2007 at 6:26am
Try the overrides CXTPTreeCtrl GetItemColor and GetItemBackColor.
 
Alternatively, I had to override the DoPaint function so I could have a better selected item when the tree doesnt have the focus (so you can actually see it, as per DevStudio) so you may have to do a similar thing.


Posted By: gwoin
Date Posted: 05 January 2007 at 8:44am
Hi,
Thank you,
I will try, but I will certainly have to repaint everything, no?


Posted By: danpetitt
Date Posted: 05 January 2007 at 9:45am

Not with the overrides, its asking you for the colour when it needs to paint.



Posted By: gwoin
Date Posted: 05 January 2007 at 10:01am
Ok, thanks,
I'll try to override.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net