Background colour selected cell/column

I am searching for 2 hours now how to change the background colour for a selected cell/column.
I am using the CellBackgroundPaint to change the colours for non-selectsd cells, but the selected ones keep being blue.

Please help me a bit.

Thanks in advanced.


You need to “return true” to indicating that you are handling the painting.

In the CellBackgroundPaint method:

[code]if me.Selected(row) then
g.ForeColor = [MyColourReferenceForASelected(Highlight)Row]
g.ForeColor = [MyColourReferenceForAStandardRow]
end if

g.FillRect(0, 0, g.Width, g.Height)

Return True

Returning True from this method will ensure that the system does not overwrite what you have done.

Wow, thanks Nona and Simon for the fast and perfect solution.