Re: Tracking Area resets to view's bounds
Re: Tracking Area resets to view's bounds
- Subject: Re: Tracking Area resets to view's bounds
- From: Quincey Morris <email@hidden>
- Date: Tue, 28 Sep 2010 12:12:18 -0700
On Sep 28, 2010, at 11:34, Jim Thomason wrote:
> [self addTrackingArea:
> [[[NSTrackingArea alloc]
> initWithRect:NSMakeRect(100, 100, 50, 50)
> options:NSTrackingActiveInKeyWindow
> | NSTrackingMouseEnteredAndExited |
> NSTrackingMouseMoved | NSTrackingInVisibleRect owner:self userInfo:nil
> ] autorelease]
From the NSTrackingArea class reference, for the constant NSTrackingInVisibleRect:
> Mouse tracking occurs only in the visible rectangle of the view—in other words, that region of the tracking rectangle that is unobscured. Otherwise, the entire tracking area is active regardless of overlapping views. The NSTrackingArea object is automatically synchronized with changes in the view’s visible area (visibleRect) and the value returned from rect is ignored.
Note the last sentence.
_______________________________________________
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