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 » CExtTreeGridWnd question Collapse All
Subject Author Date
David Skok Nov 8, 2007 - 6:51 AM

I know how to suppress painting of outlines in a tree. I would also like to place root items against the left edge of the control as they remain indented when outlines aren’t painted. How can I do this?

Thanks,
Dave

Technical Support Nov 9, 2007 - 11:31 AM

Could you send us a screenshot demonstrating what the tree grid should look like. You can override the CExtTreeGridWnd::OnTreeGridQueryDrawOutline( . . . ) virtual method and return a flag which indicates if the outline should be painted inside a particular grid cell in the tree grid window. You can override the CExtTreeGridWnd::OnTreeGridQueryColumnOutline( LONG nColNo ) virtual method and return a flag which indicates if the outline is present for column nColNo. You can override the CExtTreeGridWnd::OnGbwAdjustRects() virtual method and measure the custom outline area in particular grid cells in the column which contains the tree outline. You can override the CExtTreeGridWnd::OnGbwPaintCell() virtual method and paint completely custom tree outlines in the areas reserved by the CExtTreeGridWnd::OnGbwAdjustRects() virtual method.

David Skok Nov 9, 2007 - 12:25 PM

Overriding OnTreeGridQueryColumnOutline and returning false produces the result I want. Thank you for the suggestion.

My intention is to use the CExtTreegrid like a list box where random inserting within the list is easier to do than with CExtGridWnd or CExtReportGridWnd.