• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hand style movement inside a NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Hand style movement inside a NSScrollView
      • From: Jens Alfke <email@hidden>
References: 
 >Hand style movement inside a NSScrollView (From: Steve Sheets <email@hidden>)
 >Re: Hand style movement inside a NSScrollView (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: editing in a custom NSView
  • Next by Date: Re: Simulating menu bar blink in Cocoa
  • Previous by thread: Re: Hand style movement inside a NSScrollView
  • Next by thread: Re: Hand style movement inside a NSScrollView
  • Index(es):
    • Date
    • Thread