• 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: Scroll position of a NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scroll position of a NSTextView


  • Subject: Re: Scroll position of a NSTextView
  • From: j o a r <email@hidden>
  • Date: Wed, 3 Sep 2003 21:54:45 +0200

Just want to point out that there is a method available to find the enclosing scroll view of any view (i.e. you don't have to keep in mind if it's a direct superview or not):

- (NSScrollView *) enclosingScrollView

So, the previous code snippet could then be:

float scrollerPosition = [[[textView enclosingScrollView] verticalScroller] floatValue];

j o a r

On 2003-sep-03, at 20:49, Andreas Mayer wrote:

float scrollerPosition = [[[textView superview] verticalScroller] floatValue];
_______________________________________________
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: Scroll position of a NSTextView
      • From: Andreas Mayer <email@hidden>
References: 
 >Re: Scroll position of a NSTextView (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: How to hide Dock like iMovie does?
  • Next by Date: Changing cursor holding down the ALT key
  • Previous by thread: Re: Scroll position of a NSTextView
  • Next by thread: Re: Scroll position of a NSTextView
  • Index(es):
    • Date
    • Thread