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 » Tree grid back-ground color changing Collapse All
Subject Author Date
Offer Har Jun 5, 2008 - 11:20 AM

I have a tree grid control, and I would like to change the color where the nodes are displayed - not including the cells:



I tried overriding OnSiwPaintBackground, but it changed the color of all the cells background as well. I cannot go over all my call types and changed their background color, because there are many, and many more to come, and they should not be affected by the type of control they are in.


Can this be done, how?


Thanks,


Ron

Offer Har Jun 5, 2008 - 1:22 PM

Does it mean that by default the cells do not paint their background?


If so, then how can I paint their background from the grid (again, I cannot do it from the cells)

Technical Support Jun 5, 2008 - 1:15 PM

You should implement the CExtGridWnd::OnGridHookCellPaintBackground() virtual method and return true if your code paints the background of a grid cell. The returning false means the default background painting.

Offer Har Jun 16, 2008 - 10:22 AM

Asking again:


Does it mean that by default the cells do not paint their background?


 


If so, then how can I paint their background from the grid (again, I cannot do it from the cells)

Technical Support Jun 16, 2008 - 1:58 PM

Yes, by default the grit paints background for all its cells. A cell object paints its background only if you specify a custom background color for it. You should override the CExtGridWnd::OnGridHookCellPaintBackground() virtual method as we described in our previous answer in this thread.

Offer Har Jun 24, 2008 - 10:06 AM

Dear Support,


Can you please explain what you mean by using OnGridHookCellPaintBackground? what does this function do? how to use it?


Thanks,


Ron.

Offer Har Jun 17, 2008 - 10:58 AM

I can’t find documentation of this function - can you explain what it does and how it helps my case?


Thanks,


Ron.