Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Changing text color of a CExtPropertyCategory Collapse All
Subject Author Date
Anthony Spring Sep 8, 2006 - 8:56 AM

Hello,

I have a question on how to change the text color of a CExtPropertyCategory. I have read some other posts that Technical Support has posted on how to change it but none of them have worked for me.

I’ll give an overview of what I want to be doing first. Basically I have a grid in which every cell can have a N amount of items in it. When the user clicks on the cell the property window populates and lists every item with a new CExtPropertyCategory. I recently just changed it so that when a user deletes an item, they can view it later by using a View Deleted toggle. What I need to do now is in that new property window to have the deleted entries show up in a different color than the active ones.

I did not write most of the code that is being used for the Property Grid and the Grid Window but I can tell you that the property grid is a CExtPropertyStore and the grid window is a custom grid window that inherits from CExtGridWnd.

Right now all that is being done to insert new categories is to create it and then use the CExtPropertyStore::ItemInsert() function.

Any help/suggestions are greatly appreciated.

Thanks!

Anthony Spring Sep 11, 2006 - 12:08 PM

Thanks! This worked exactly like I wanted it to.

Technical Support Sep 9, 2006 - 11:55 AM

The property grid control is a container for several tree grid windows. The categories are represented by grid cells of the CExtPropertyGridCellArea class. This class implements the CExtGridCell::OnQueryTextColor() virtual method. So, derive a class from CExtPropertyGridCellArea and implement the same virtual method. The second step is to use new grid cells in the property grid control. Derive a class from CExtPropertyGridCtrl and implement the CExtPropertyGridCtrl::OnPgcCreateGrids() virtual method. Make it similar to original but create your own CExtPropertyGridWndCategorized-derived window. In this class, implement the CExtPropertyGridWnd::PropertyItemInsert() virtual method: make it similar to the original one but using your new CExtPropertyGridCellArea-derived class we mentioned above.