listbox cell fillrect "blued out" when row selected?

I have cells in a listbox which I have drawn “buttons” in using g.ForeColor and g.FillRect. The trouble is whenever a row is selected, the row is of course highlighted in blue, which obliterates my drawn buttons completely. I’ve tried using the selected property with 2 different sets of colors in an if…else statement (ie: turn the color to white), but this has no effect.

Is there a way to stop my buttons from being “blued out”?

I forget which it is… but you have to return TRUE in either CELLBACKGROUNDPAINT , CELLTEXTPAINT or both…

Excellent. Thanks Dave!

P.S. It’s CellBackgroundPaint. :slight_smile: