문제

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.

도움이 되었습니까?

해결책

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

[[button cell] setHighlightsBy:NSContentsCellMask];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top