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

<p>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.</p>

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

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.