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 » CExtTreeGridWnd Collapse All
Subject Author Date
Mac Will Dec 20, 2005 - 2:36 PM

Hello,


I am having trouble painting the area behind the treeboxes as well as using XP treeboxes in my inherited class from CExtTreeGridWnd.


If you could let me know what needs to be done for this that would be great.


Thanks


MAC

Mac Will Dec 22, 2005 - 10:48 AM

First off,  I have found where you paint the non-cell area in the propertygrid so no need to answer that for me.


However i do have another question.


Could you please let me know how OR point me to the function where this is done in the property grid.


1) How to remove dotted line between tree items.


2) How to change grid line colour.


 


Thanks again


 


MAC

Technical Support Dec 23, 2005 - 2:08 AM

The CExtGridBaseWnd::OnGbwPaintCell() contains the code which draws grid lines. You can override this method in your tree grid window, invoke the parent method and overdraw the grid lines like you need. The grid lines are drawn using the coordinates specified by the rcCell parameter.

Mac Will Dec 22, 2005 - 8:20 AM

Also, if possible could you point me to the location where you remove the dotted lines conneting the tree items in the property grid.

thanks!

Technical Support Dec 22, 2005 - 1:26 PM

Please override the CExtTreeGridWnd::OnTreeGridQueryDrawOutline() method. Your method should simply return false.

Mac Will Dec 21, 2005 - 2:32 PM

Thanks,


However i still don’t see how to paint the area behind the two icons iconTreeBoxExpanded and iconTreeBoxCollapsed.  I do have several cell types and in I override the OnPaintBackground I can paint the particular cell I was referencing but not the area behind the icons nor the area down the left side with no cells???

Technical Support Dec 23, 2005 - 2:05 AM

The CExtTreeGridWnd class is derived from CExtGridWnd and serves for displaying tabular data with a tree-like data structure in the vertical direction. The CExtTreeGridWnd::OnGbwPaintCell() method implements the grid cell painting with attention to the column(s) having the tree outline. You can override this method, draw the custom background and invoke the parent method if you would like to see custom paint area for particular rows/columns.

Mac Will Dec 21, 2005 - 9:40 AM

Also I noticed in the property grid the category cells can span multiple columns.  How is this done?


Why is CExtTreeGridWnd not in the help?  Is it because it is just a intermediary class for the property grid?

Technical Support Dec 21, 2005 - 10:42 AM

The tree grid windows in the property grid control are instances of the CExtPropertyGridWnd class which is derived from CExtTreeGridWnd. The CExtPropertyGridWnd class manages two grid columns in a special way. It manually changes the width of the grid cell which describes the category name. This adjustment is performed in the CExtPropertyGridWnd::OnGbwAdjustRects() method. The CExtTreeGridWnd class is implemented as an internal class. It is used both in the property grid control and in the report grid control (not finished yet).

Mac Will Dec 21, 2005 - 7:35 AM

Ok this is what I have:


http://www.bnmd.ca/xwave/radiosDLG.JPG


 


And this is what I want it to look like:


http://www.bnmd.ca/xwave/pgrid.JPG


 


Basically I would like it to look just like the property grid but with several columns


 


Thanks

Technical Support Dec 21, 2005 - 10:36 AM

The CExtTreeGridWnd windows in the property grid control use CExtPropertyGridCellArea in the left column with property category/value names. This cell class paints a custom background in the CExtPropertyGridCellArea::OnPaintBackground() virtual method. You can also define your own cell class and repaint the background in it. The CExtTreeGridWnd has two properties of the CExtCmdIcon type: m_iconTreeBoxExpanded and m_iconTreeBoxCollapsed. They contain icons which are used as tree boxes. So, you can assign any expand boxes you like.

Technical Support Dec 21, 2005 - 4:04 AM

Please provide us with more details about which area exactly should be repainted? A screenshot that shows the problem would be appreciated.