I thinks a image is better than a thousand words.
What you see in this picture are NSBox
Subclass in a NSViewCollection
. I set the fill color to "Selected Menu Item Color" is Interface builder.
Why is the color like that ?
Edit : After reading this SO post, I found out I probably have to set the setPatternPhase. But how/where ?
Inspired by Smilin Brian's solution I came up with this :
For the moment it just handles mouseOver events and not selection but it's pretty much the same.
Just for the who might need that for a NSBox I used :
and