mouse - In Cocoa, what is the best way to change the cursor when hovering over a circular view? -


What do I do

I have a circular custom NSView subclass , And I want to change the appearance of the cursor when the mouse is hovering over the circular part of the view, but not when there are parts of the rectangle of that scene which falls outside the circle.

I would have outlined it with an image tag, but I am also new to being part of such awesome features.

What do I know till now?

I know how to change the appearance of the cursor through the nicers, I think it's rectangular The best way to complete the cursor will be with the rectangle I know that I can get a mouse mood event (and when the mouse is not using the mouse attribute and mousex on this view, then they should be closed), and To determine A simple, inexpensive method is whether or not a point is in the field of interest.

Then what's the problem?

As far as I can tell, the system does not send the mouse using the event in a view that is not the first responder. Therefore, if I want to receive mousemovaged events to see the mouse, when mouse is hovering over my scene, then I need to steal the position of the suspenders, which is currently if there is a text view focus , Then simply stole it from moving the mouse over the scene, which is unacceptable from the point of view of usability.

So, my question is: Is there a better way to do this? Can I get mouse movers events without first responding?

Thank you!

I will add the following tag: Custom-view mouse-event assistant first responder but again, I can not do a SA Noob so I can.

I think you may need to accept NSView to return to yes if you If you do not do this, the scene will not get information about an event.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -