Print Page | Close Window

Change group title text font and color

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=13902
Printed Date: 28 April 2024 at 1:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change group title text font and color
Posted By: nowlex
Subject: Change group title text font and color
Date Posted: 02 April 2009 at 3:47pm
Does Task Panel work like Windows XP "Windows Security Center" app from MS.  In the main area, you see "Firewall", "Automatic Updates", and "Virus Protection" that you can put controls on the group panel title.

I don''t find a place you can set the font of Group Title text and color. And say, adding another line of text with a different font dynamically on the title.

Please let me know if Xtreme Task Panel can do it, and how.
 
Thanks,

Nowlex



Replies:
Posted By: rdhd
Date Posted: 20 April 2009 at 3:00pm
We subclassed the task panel and in our constructor we set a custom theme. Our custom theme is subclassed from CXTPTaskPanelExplorerThemePlain. Then we override and implement DrawGroupCaption, DrawCaptionGripper and other methods so we can draw our own colors and use our own font.
 
The base class does have a protected CFont member (m_fntCaption). So if you only want to change the font, you should be able to load your font directly into the CFont object. There are member colors (protected) for groups but I don't see a member color for the text. However when our them draws, we call GetXtremeColor(COLOR_GRAYTEXT). The color can be set using CXTPColorManager::SetColor(COLOR_GRAYTEXT, RGB(myR,myG,myB). However that will affect any text drawing that uses COLOR_GRAYTEXT.
 
You could override the draw routine we did and simply set your font, your color and then call the base class to draw. Then reset the color to the original color so only your task panel text draws with your color.



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