Print Page | Close Window

Font colour

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=15593
Printed Date: 16 November 2024 at 3:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Font colour
Posted By: link
Subject: Font colour
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: markr
Date 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);
...



Posted By: link
Date Posted: 18 November 2009 at 11:01am
thx. it was getitemmetrics() that i was looking for.



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