• 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: Glen Low <email@hidden>
  • Date: Tue, 20 Apr 2004 08:06:11 +0800

Allan:

On 11/04/2004, at 10:55 AM, Allan Odgaard wrote:

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.


Great... works like a charm! I didn't realize the verticalLineScroll and horizontalLineScroll values were actual pixel amounts the view would be scrolled by.



Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.


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>)
 >Re: Line/page scrolling an NSScrollView (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Current mouse screen?
  • Next by Date: Re: accessing newly-created files
  • Previous by thread: Re: Line/page scrolling an NSScrollView
  • Next by thread: How to find what kind of Objects are contained in NSArray
  • Index(es):
    • Date
    • Thread