Adjusting cursor in non-key Panel window
Adjusting cursor in non-key Panel window
- Subject: Adjusting cursor in non-key Panel window
- From: Matt Gough <email@hidden>
- Date: Wed, 21 Jan 2009 18:58:20 +0100
I have an NSButton subclass which sets the cursor to the
pointingHandCursor whenever the mouse is over it. This button is in an
NSPanel (Utility-styled).
@implementation PointingHandButton
-(void)resetCursorRects
{
[self addCursorRect:[self bounds] cursor:[NSCursor
pointingHandCursor]];
}
@end
Unfortunately the cursor only gets set when the panel is the key
window and does not get set if the panel is non-key (but still front-
most).
What is the best way to try and achieve this? If I could require 10.5
then it looks like NSTrackingArea would be the way to go, in
conjunction with NSTrackingActiveInActiveApp. Unfortunately I need to
support 10.4 so this is not an option for now.
Thanks
_______________________________________________
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