Get scroll bar position of an NSScroller on the fly


The purple rectangle is an NSView. In its awakeFromNib method I call [[NSViewController alloc] initWithNibName:@"nib" bundle:nil]].

The red rectangle is an NSScrollView aka @"nib". This view includes the vertical scroll bar.

The green box is an NSBox nib which is selected by NSCollectionViewItem.

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/TTDVR.png" data-original="https://i.stack.imgur.com/TTDVR.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

How would one observe and get the scroll bar knob's position on the fly when scrolling through a list (i.e. while dragging the knob)?

Thanks for the help :)


While not an <em>exact</em> duplicate, the answer is the same as the one found here: <a href="https://stackoverflow.com/questions/4077843/how-to-detect-scrolling-for-nsoutlineview" rel="nofollow">How to detect scrolling for NSOutlineView?</a>


  • How to always visible horizontal scrollbar of NSTableview in objective c programmatically?
  • Mac dev - Help getting started with 2d games
  • Cannot use respondsToSelector using ARC on Mac
  • Setting affine transform on NSView layer not working as on iOS
  • how to get Apple “command button” key code programmatically?
  • How to set image position programaticall in objective c?
  • How to make NSView's background image not repeat?
  • error with Xcode 6 'Duplicate interface definition for class 'ViewController'
  • NSScrollView scroll downward when resizing?
  • Regex - Match Last Occurance
  • Context menu disappears when opened with Key.App
  • How to enable Drag a Marker (Android Map Api v2) after a single Touch?
  • springboot + webpack dev server, does not change localhost bundle file after rebuilding
  • How do I fix “The program issued a command but the command length is incorrect.” error when calling
  • Get sibling of Vaadin Tree Item?
  • Deserialize Dictionary
  • Error Processing Request: Mage registry key “_singleton/inchoo_notes/feed_updates” already exists
  • my tic-tac-toe program in matlab does not work [closed]
  • Creating NSCollectionView with datasource programatically
  • C# List of Panels
  • How to get listview position?
  • KnockoutObservableArray with typed elements in TypeScript
  • Connect .sks to skscene.h
  • How do I superscript characters in a UIButton?
  • How to test if a URL from an Eclipse bundle is a directory?
  • Row Count Is Returning the incorrect number using RaptureXML
  • Highlight and Bold text in JTextPane
  • Xamarin Forms - UWP Fonts
  • How to draw moving and Running sine wave chart using JFree chart in java?
  • Obtain ObjectIdHex value from mgo query
  • How to convert from System.Drawing.Color to Excel.ColorFormat in C#? Change comment color
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • how to add data labels for bar graph in matlab
  • Cannot Parse HTML Data Using Android / JSOUP
  • NSLayoutConstraint that would pin a view to the bottom edge of a superview
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Getting Messege Twice Using IMvxMessenger
  • Android Google Maps API OnLocationChanged only called once
  • Bitwise OR returns boolean when one of operands is nil
  • How to load view controller without button in storyboard?