Emulating a table with a custum NSScrollView
How d开发者_如何学JAVAo I create a custom scroll view similar to a table? I would like to have a header that scrolls horizontally with the documentView, but is always at the top (and the scrollbar starts underneath it).
I've attached an image of what I have so far:
Currently, I simply render the header inside the documentView, and I'm sure I could simply draw it at the top of the visible rect, but how do I move the vertical scrollbar down?
I've tried changing the frame size of the contentView, but I've had no luck with that. If anyone knows the proper way to implement this, I'd appreciate it. Thanks!
Are you really sure you want to do that as Lion now removes the scrollbars?
精彩评论