• 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
Re: question about custom cursor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about custom cursor


  • Subject: Re: question about custom cursor
  • From: Fred Hope <email@hidden>
  • Date: Tue, 6 Mar 2007 20:47:29 -0800

Hi Alastair, thanks for the reply.

I alloc+init my cursor with this line:
cursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"cursor.tiff"] hotSpot:NSMakePoint(8,0)];


And I set the cursor's rect and such here (I have the custom cursor appear when the mouse enters the image view, and the arrow cursor returns when the mouse exits the view):
NSRect rect = NSMakeRect(0, 0, WINDWIDTH-1, WINDHEIGHT-1);

[imgView addCursorRect:rect cursor:cursor];
[imgView addTrackingRect:rect owner:cursor userData:nil assumeInside:NO];

[imgView addCursorRect:rect cursor:[NSCursor arrowCursor]];
[imgView addTrackingRect:rect owner:[NSCursor arrowCursor] userData:nil assumeInside:NO];

[cursor set];
[cursor setOnMouseEntered:YES];
[[NSCursor arrowCursor] setOnMouseExited:YES];


The [cursor set] call here may be unnecessary. In any case, is there a problem with how I've set up the cursor, or is there some method I can call at the end of the function that prints text (like I said, the problem is with the final [textField setEditable:NO] call).

-Fred
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: is safari multi-threaded? : a theory question on threading
  • Next by Date: Caching the Image from Webview
  • Previous by thread: Re: question about custom cursor
  • Next by thread: Calculating the size of NSFont...
  • Index(es):
    • Date
    • Thread