Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Font colour
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Font colour

 Post Reply Post Reply
Author
Message
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 Topic: Font colour
    Posted: 11 November 2009 at 2:06pm

for CXTPPropertyGridItem's in the grid: if they are set to read only then they appear gray with lighter gray background.

can i override this without having to owner draw the control? i know i can set the entire grid to AllowEdit(FALSE); but then user cannot edit combo box items, etc...
 
thx
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2009 at 7:24am
Hello,
 
You can just remove edit from item with pItem->SetFlags(0);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 12 November 2009 at 3:07pm
You can also take complete control over the font colors (including read-only) like so:

m_wndPropertyGrid.GetPaintManager()->GetItemMetrics()->m_clrFore = RGB(X,X,X);
m_wndPropertyGrid.GetPaintManager()->GetItemMetrics()->m_clrReadOnlyFore = RGB(Y,Y,Y);
...

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: 18 November 2009 at 11:01am
thx. it was getitemmetrics() that i was looking for.
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.141 seconds.