Change group title text font and color |
Post Reply |
Author | |
nowlex
Newbie Joined: 02 April 2009 Location: United States Status: Offline Points: 1 |
Post Options
Thanks(0)
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 |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |