Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about custom cursor



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.