I have an NSCollectionView
with a few NSView
s in it. The NSView
has an NSBox
in it that changes color when it is selected. I want to also make the NSBox
change color when hovered over.
I subclassed NSBox
and added the mouseEntered
and mouseExited
methods. I used addTrackingRect
inside of viewWillMoveToWindow
but the problem is that the hover over effect only happens if I first select the subview that the box is in.
Furthermore only the box that is selected has the Hover Over effect happening on it. How can I implement the Hover Over effect such that all the NSView
s in my NSCollectionView
show the effect immediately?