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 Tech Support » Removing caption cell from CExtPropertyGrid Collapse All
Subject Author Date
Juri Tsjornoi Nov 27, 2007 - 4:12 AM

Hello!
Could you tell me please, is it possible to use CExtPropertyGrid control without caption cell (left cell)? So that only value cell (right cell) will be in the grid.
I guess I should overwrite CExtPropertyItem::OnGridRowInitialized method?

Technical Support Nov 27, 2007 - 5:46 AM

A CExtPropertyGridCtrl control is a container for one or more CExtPropertyGridWnd-based tree grid windows displaying the content of an attached property store. By default, two tree grid windows are used, CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted. These tree grids are designed for a two-column layout. The property grid control won’t work if any of the inner tree grids has only one column with values.

If you need a single column grid, you can use a custom property grid control which initializes some custom tree grid classes. That is you should override the CExtPropertyGridCtrl::OnPgcCreateGrids() method in a CExtPropertyGridCtrl-derived class. Make this method similar to the original one except that you should use your CExtPropertyGridWndCategorized-derived and CExtPropertyGridWndSorted-derived tree grid classes. In these tree grids, override the CExtPropertyGridWnd::OnGbwAdjustRects() method so that you can adjust default rectangles of grid cells inside the tree grid window. The CExtPropertyGridWnd::OnGbwAdjustRects() method works in a way that a grid cell in the first column of property category row covers a cell in the second value column (that is empty for category rows). You should do the same with property value rows, but the second value column should cover the first name column.