Synchronize Scrolling of Two (or More) NSScrollViews
You can make two NSScrollView
s scroll in concert quite easily because every scrolled pixel is broadcasted to interested parties. In TableFlip, the main table is a NSTableView
contained in a NSScrollView
. You can view and hide row numbers in TableFlip; but I didn’t want to reload the whole table and mess with the table model to insert and remove the first column. Instead, I use a second table view with a single column. The upside of this approach: I can animate hiding the whole scroll view with the row numbers inside easily without affecting the main table.
Scroll NSScrollView Programmatically Without Showing the Scroller Knobs
I am currently working on a typewriter mode text view. Even though this is a very popular trend for a couple of years, I couldn’t find any open source component for this feature. I assume those who figure this out keep it a secret. If that is the case, it doesn’t make that much sense nowadays anymore since every 3rd note taking app or so has such a feature already.