I'm experimenting with creating a custom scope bar that uses recessed-style NSButtonCell objects. However, I'm having trouble drawing the bezel when the mouse is hovering. I can make it work by creating tracking areas and setting showsBorderOnlyWhileMouseInside to NO while the mouse is inside, and YES when it moves outside, but this feels like a hack to me, especially since NSButtonCell will do the tracking on its own.
If I use the control's setCell method, the button cell will call the control's addTrackingRect:owner:userData:assumeInside: and set up its own tracking to draw the bezel when the mouse is hovering. However, if I want to use multiple button cells in the same control, I try to set each cell's controlView to the custom control using the button cell's setControlView method, but it doesn't prompt the cell to set up tracking areas like setCell does.
The technique must be possible since NSMatrix does this, but after reading every API and forum available, I haven't found a way to initiate NSButtonCell's tracking behavior without using its control's setCell method. My forehead is bloody from beating against the desk - help would be appreciated.