Point under a scroller?
Point under a scroller?
- Subject: Point under a scroller?
- From: Mark Dawson <email@hidden>
- Date: Tue, 1 Mar 2005 09:00:26 -0800
It seems to me that to implement an autoscrolling region for an existing view that may be bigger than its NSScroller view, I want to track when I'm "under" the scrollers; if so, then send the autoscroll: message. However, to do this, I need to figure out when I'm under the scrollers.
If I have a subview of a scroller, how do I determine whether or not a point in that subview is under the scrollbar or scroll arrows?
Is the below the correct way to get the scroller rect?
<x-tad-bigger>// convert scroller to local coordinates
</x-tad-bigger>NSScroller *superView = [self superview]; // Should I cast this? (NSScroller *)[self superview]?
NSRect scrollerRect = [self convertRect: [superView rectForPart:NSAllScrollerParts] fromView:superView];
<x-tad-bigger>
Would I then use [self mouse:point inRect:</x-tad-bigger> scrollerRect], even if I'm not using the mouse cursor? Where "point" would be the right-most point of the item I'm scrolling (for the vertical scrollers)--I think it makes more sense to instigate an auto scroll when the piece I'm dragging enters the "autoscroll" region, rather than the cursor itself. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden