NSButton - Gray rectangle whenever the custom button is clicked

663 views Asked by At

Can I just want to replace the appearance by setting a property of NSButton?

I am able to change the appearance by using the "image" property of the button but I got an ugly gray rectangle whenever the custom button is clicked (the image has a transparency). Is there a way to hide that rectangle?

Thanks.

1

There are 1 answers

0
hamstergene On BEST ANSWER

The following call changes the behavior by making image be darkened when clicked:

[[button cell] setHighlightsBy:NSContentsCellMask];