Re: Hand style movement inside a NSScrollView
Re: Hand style movement inside a NSScrollView
- Subject: Re: Hand style movement inside a NSScrollView
- From: Jamie Phelps <email@hidden>
- Date: Fri, 18 Apr 2008 19:51:43 -0500
Not sure if it's suitable for your purposes, but IKImageView and its
currentToolMode property (IKToolModeMove). This would get you the
behavior you want for free.
JP
On Apr 18, 2008, at 2:49 PM, Steve Sheets wrote:
Does someone have any suggestions or hints about how to do this?
I am using NSScrollView to display some graphical data. The Scroll
View displays a section of my custom view which displays the
graphics. The user can drag the horizontal and vertical scrollers to
change the visible position inside the graphics. It function the way
you would expect any graphic program to work.
Depending on the current selected too, when the user clicks in the
scroll view on my custom view and drags, if the drag goes outside
the view area, the scrolled automatically scrolls to show more area.
I called setScrollsDynamically:TRUE for my scroll view, and the
object handles this automatically (Thank you Apple). Again, it is
what you expect from a well behaved draw program.
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. This function is different then the
scrollsDynamically flag (which auto scrolls if you go outside the
view display rectangle).
Does anyone have any suggestions on how to implement? Or better yet,
some examples? I would have thought this call would be implemented
by the NSScrollView object (it is more difficult then
scrollsDynamically), but I can not find any suggestions on how to do
it.
Thank you,
Steve Sheets
_______________________________________________
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
_______________________________________________
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