Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Setting CXTPPropertyGridItem value to bold?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting CXTPPropertyGridItem value to bold?

 Post Reply Post Reply
Author
Message
andrewg View Drop Down
Groupie
Groupie


Joined: 24 September 2007
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote andrewg Quote  Post ReplyReply Direct Link To This Post Topic: Setting CXTPPropertyGridItem value to bold?
    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?
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
link View Drop Down
Groupie
Groupie


Joined: 02 July 2009
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote link Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.