Pergunta

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.

Foi útil?

Solução

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

[[button cell] setHighlightsBy:NSContentsCellMask];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top