Re: Hand style movement inside a NSScrollView
Re: Hand style movement inside a NSScrollView
- Subject: Re: Hand style movement inside a NSScrollView
- From: Ben Lachman <email@hidden>
- Date: Fri, 18 Apr 2008 23:59:25 -0400
On Apr 18, 2008, at 9:14 PM, Jens Alfke wrote:
On 18 Apr '08, at 12:49 PM, Steve Sheets wrote:
However, I also want to implement a "Hand" style tool. One that
allows the user to simple click inside the Scroll View and draw
the graphics around.
I think you just need to have your view's mouseDragged: handler
method call -scrollPoint: on self. The only tricky bit is figuring
out what point (in your view's coords) should become the origin of
its visible bounds.
I tend to like scrollRect:by: for this sort of thing since it takes a
offset to a rect.
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
email@hidden
740.590.0009
_______________________________________________
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