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 Tech Support » CExtGridCellColor question Collapse All
Subject Author Date
Offer Har Jul 12, 2007 - 6:30 AM

Dear Support,

I have a cell that displays only color: CExtGridCellColor::eNone. I would like the color’s rectangle to fill the cell.
How can this be done?


Technical Support Jul 12, 2007 - 9:24 AM

You can override the CExtGridCell::OnPaintBackground() method and paint the cell background with the currently specified color yourself.

It seems the CDemoColoredCell class in the SimpleGrids sample is exactly what you are looking for. The instances of this cell class are created in the first column of the grid control under the Colors tab. The second and third columns of this grid control contain cells with check marks and combo boxes, which allow you to customize the text/background color of the CDemoColoredCell objects.