Okay, here is the problem:
I have a NSTextView
and I add my custom NSButton
using:
[_textView addSubview:button];
Then, inside my NSButton
subclass, I have (along with the NSTrackingArea
stuff):
- (void)mouseEntered:(NSEvent *)event{
[[NSCursor arrowCursor] set];
}
- (void)mouseExited:(NSEvent *)theEvent{
[[NSCursor arrowCursor] set];
}
- (void)mouseDown:(NSEvent *)theEvent{
[[NSCursor arrowCursor] set];
}
- (void)mouseUp:(NSEvent *)theEvent{
[[NSCursor arrowCursor] set];
}
But when I hover it, the cursor remains the same IBeamCursor
(because it's a NSTextView
). Only when I press the button, the cursor gets updated. And then, when I move the mouse, still inside the button, the cursor goes back to the IBeamCursor
.
Any ideas on how to do this? Thank you!
cursorUpdate:
, as specified in "Managing Cursor-Update Events"? – Cultivator