views:

83

answers:

0

Hi,

I'd like to use image templates on some of my buttons to have them behave as follow :

  • Raised background in "normal" state, so the image appears engraved in the button
  • When the button is pushed, the image turns to blue until it's released (like a selected toggle button)
  • I need my button to be without borders

I tried different combinations of button styles and modes, to no avail... a button without borders seems to ignore it has an image template (?)

So I tried subclassing NSButtonCell and/or NSButton to force backgroundStyle, showsStateBy and highlightsBy but I only succeeded in having a raised background. At best, the background of my button would turn white when clicked.

I cannot figure out how I would achieve what I'm trying to do, if it's at all possible... would someone have any clue ?