Question

I'm trying to figure out a way to have a NSTableColumn be pinned to the left side of my NSTableView. What I have been thinking of is putting two NSTableView's side by side, where the first one contains the 'pinned' column and the second on contains the dynamic data. Setting the first table to disable horizontal scrolling, then detecting when either table is scrolled vertically and keeping the two in sync.

What I'm wondering, is if anyone else has any experience in doing something similar? I don't want to re-invent the wheel if its already been done.

Was it helpful?

Solution

Thats exactly what I did. Two NSTableView's directly beside each other. The first I subclassed the NSScrollView and modified the scroll events to do nothing. The second I subclassed again the NSScrollView and modified the scroll events to cause the header to mirror it. Works great.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top