Pedro Vieira
Pedro Vieira

Reputation: 3370

NSButton with an Image

I have a question. I have a button on my .xib and a background image. I set an image to my button through the attributes inspector, but when I run the program and press the button, this happens:

If I don't press it, it looks fine. What's wrong?

Upvotes: 2

Views: 1983

Answers (1)

kperryua
kperryua

Reputation: 10534

This is controlled by the setHighlightsBy: property on the cell. It's probably set to NSChangeBackgroundCellMask by default. Try setting NSContentsCellMask (if you have an alternate 'pressed' image) or NSNoCellMask.

Upvotes: 3

Related Questions