Print Page | Close Window

Setting CXTPPropertyGridItem value to bold?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=8253
Printed Date: 21 November 2024 at 6:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting CXTPPropertyGridItem value to bold?
Posted By: andrewg
Subject: Setting CXTPPropertyGridItem value to bold?
Date Posted: 01 October 2007 at 3:38pm
As the title says, how do you set the value or the caption for that matter to bold weight?



Replies:
Posted By: mgampi
Date Posted: 01 October 2007 at 5:32pm
Hi;
One possible solution could be to create your own CXTPPropertyGridPaintManager derives class and overwrite the function

CFont* CXTPPropertyGridPaintManager::GetItemFont(CXTPPropertyGridItem* pItem, BOOL bValuePart)

Then dependig on your settings/need you can return the pointer to the m_fontBold member of the item metics class (see CXTPPropertyGridItemMetrics())
 
Or you overwrite the SetDefaultValues() function of the CXTPPropertyGridItemMetrics() class and set m_fontNormal to a bold font...


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: link
Date Posted: 12 November 2009 at 5:36pm

Hi, I'd like to follow up with this question.

Is this still a valid answer?
 
If you subclass CXTPPropertyGridPaintManager, you also must subclass CXTPPropertyGridItemMetrics as well as the property grid class itself.
This is not really manageable...
 
The fonts in the CXTPPropertyGridItemMetrics need to be accessible, etc...
 
Thx.



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