• 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: Line/page scrolling an NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line/page scrolling an NSScrollView


  • Subject: Re: Line/page scrolling an NSScrollView
  • From: Allan Odgaard <email@hidden>
  • Date: Sun, 11 Apr 2004 04:55:22 +0200

On 11. Apr 2004, at 2:09, Glen Low wrote:

You'll need to implement the moveUp:/moveDown: action methods in the embedded view and have these use scrollRectToVisible: or scrollToPoint:.
That's what I thought. But consider this: the NSScrollView already *knows* how to scroll by a line, since it does so when you click on the up-arrow or down-arrow. How do I use that inbuilt functionality?

Yes, I do catch your drift, but probably scroll line down can be made simply with:

[self scrollRectToVisible:
NSOffsetRect([self visibleRect],
0, [[self enclosingScrollView] verticalLineScroll]
)];

So any solution involving having the scroll view believe the arrow gadgets where clicked, is probably more complex.

[...] Strange though that the NSScrollView doesn't implement any of the scrollxxx methods.

Agree! :)




** Cocoa FAQ: <http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Line/page scrolling an NSScrollView
      • From: Glen Low <email@hidden>
References: 
 >Line/page scrolling an NSScrollView (From: Glen Low <email@hidden>)
 >Re: Line/page scrolling an NSScrollView (From: Allan Odgaard <email@hidden>)
 >Re: Line/page scrolling an NSScrollView (From: Glen Low <email@hidden>)

  • Prev by Date: Re: Line/page scrolling an NSScrollView
  • Next by Date: Re: NSURLConnection oddity
  • Previous by thread: Re: Line/page scrolling an NSScrollView
  • Next by thread: Re: Line/page scrolling an NSScrollView
  • Index(es):
    • Date
    • Thread