• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Setting cursor for subview of NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting cursor for subview of NSTextView


  • Subject: Setting cursor for subview of NSTextView
  • From: email@hidden (Stefan Haller)
  • Date: Fri, 12 Mar 2010 22:11:02 +0100

I have a custom NSTextAttachmentCell that does its work by adding
subviews to the NSTextView (e.g. NSButtons). This works fine.

What I can't get to work is cursor handling; I always get an arrow
cursor when the mouse is over my views. I overwrite resetCursorRects,
like this:

- (void) resetCursorRects
{
    [super resetCursorRects];
    [self addCursorRect:[self bounds] cursor:[NSCursor pointingHandCursor]];
}

This doesn't help.  Getting desperate, I tried implementing mouseMoved:,
but it's not even called (I made sure that my window has
setAcceptsMouseMovedEvents: set to YES).

Any ideas what else to try, or how to debug what's going on?  Setting
breakpoints at [NSCursor set] or [NSCursor arrowCursor] didn't get me
very far yet.

Thanks,
   Stefan


--
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
_______________________________________________

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

  • Follow-Ups:
    • Re: Setting cursor for subview of NSTextView
      • From: Martin Wierschin <email@hidden>
  • Prev by Date: Re: Better sorting using threads?
  • Next by Date: Clicking on an NSColorWell
  • Previous by thread: Re: .ini file class?
  • Next by thread: Re: Setting cursor for subview of NSTextView
  • Index(es):
    • Date
    • Thread