tags:

views:

341

answers:

1

I am using several NSButtonCell objects in an NSTableView. They are simple square buttons with custom images on them.

These buttons draw properly when they are not highlighted: all that is visible is the image, and the rest of the button rectangle is transparent. However, when I click on them, the entire button rectangle is highlighted, inverting the background in the parts that were transparent.

I would prefer to see the image drawn inverted, and the transparent parts remain transparent. How can this be done?

+3  A: 

Try setting your cell's highlightsBy property to NSContentsCellMask. I think you'll have to do this in code (probably in awakeFromNib); I don't see a way to do it in IB alone.

Peter Hosey
That did it! Thank you.
e.James