开发者

NSButton with an Image

I have a question. I have a button on my .xib and a background i开发者_高级运维mage. I set an image to my button through the attributes inspector, but when I run the program and press the button, this happens:

NSButton with an Image

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜