Professional UI Solutions
Site Map   /  Register


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 » Resizable cells in CExtTreeGridWnd Collapse All
Subject Author Date
Bart Kampers Dec 10, 2007 - 1:52 AM


How can I configure CExtTreeGridWnd so that users can resize cells by dragging the grid lines?

Thanks in advance,


Technical Support Nov 11, 2010 - 11:28 AM

We checked a similar tree grid control in the FilteredGrids sample application and it shows correct the resizing cursor. We suspect the problem with resizing cursors is caused by something we have not discussed yet in this forum thread. Could you please create a test project demonstrating this problem and send it to us?

Technical Support Dec 11, 2007 - 12:29 PM

You did everything correctly, but we forgot to discuss one more issue. Prof-UIS grid controls keep minimal/current/maximal column widths/row heights in outer header cells (CExtGridCellHeader). So, if you need to have resizable columns in your tree grid, then you need to initialize one outer header row at top and instantiate header cells in it. If you don’t need an outer header row at top, you can set its height to zero with CExtGridWnd::OuterRowHeightSet(). If you need to set the initial minimal/current/maximal width for each column, you should get an appropriate CExtGridCellHeader object and invoke its ExtentSet() method.

Bart Kampers Dec 11, 2007 - 9:26 AM

Thanks, but I still don’t get it.

I applied CExtGridWnd::HoverEventsSet() and CExtGridBaseWnd::SiwModifyStyle() exactly as in the SimpleGrids example but the cells are not resizable.

When I try the code below the cursor changes into a bar with two arrows when I move it over the grid. This suggests that I can resize the cells but they stay as they are.

//| (bFullRowMode ? __EGBS_SUBTRACT_SEL_AREAS : 0)

mTreeCtrl->HoverEventsSet( true, true );

Technical Support Dec 10, 2007 - 9:43 AM

This feature is configured in absolutelyd the same way both for CExtTreeGridWnd and for CExtGridWnd. So, you can find some appropriate option of row/column resizing in the SimpleGrids sample. Generally, you should enable hover events for appropriate grid areas where you want to have resizable cells first. You can do this by invoking the CExtGridWnd::HoverEventsSet() method. Then you should apply the combination of the cell resizing styles using the CExtGridBaseWnd::SiwModifyStyle() (apply the combination of one or more __EGBS_RESIZING_CELLS_*** styles):

#define __EGBS_RESIZING_CELLS_OUTER_H     0x00040000L
#define __EGBS_RESIZING_CELLS_OUTER_V     0x00100000L
#define __EGBS_RESIZING_CELLS_INNER_H     0x00200000L
#define __EGBS_RESIZING_CELLS_INNER_V     0x00400000L

Bart Kampers Nov 11, 2010 - 7:46 AM

I would also like to have that resize cursor when the mouse is between two outer cells. Now I only see this cursor when dragging. Your examples show it when hovering. I cannot find out how you did that.