Re: cursorUpdate was called, but cursor was not updated
Re: cursorUpdate was called, but cursor was not updated
- Subject: Re: cursorUpdate was called, but cursor was not updated
- From: Steve Mills <email@hidden>
- Date: Fri, 05 Apr 2013 12:29:48 -0500
On Apr 5, 2013, at 12:25:05, Peng Gu <email@hidden> wrote:
> I have a custom button, which was added as a subview of a textview. And I
> want the cursor to be changed to arrowCursor instead of the beam cursor
> when hover on the button.
>
> So I added tracking area. The cursorUpdate method was indeed called, but
> the cursor was still the beam cursor. It seems the cursor was changed back
> to beam cursor after cursorUpdate method was called.
>
> Any ideas?
I had a similar problem, and the only solution I found was to keep track of whether or not the cursor was in the subview, then in the superview, check that state and NOT set the cursor there if it was true. So, if the superview is not one of your custom subclasses, you'd make it a subclass just so you can do that. Hopefully there's a better solution, because this one is very icky.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden