Re: NSTableView fixed columns
Re: NSTableView fixed columns
- Subject: Re: NSTableView fixed columns
- From: Moray Taylor <email@hidden>
- Date: Thu, 19 Feb 2004 19:13:15 +0000
Hi Dave,
I had this exact same problem a couple of days ago, I have done it
using two NSTableViews and syncing them, with code like this (Java, but
I'm sure the principle is the same in Obj-C.)
public void reflectScrolledClipView(NSClipView aClipView) {
super.reflectScrolledClipView(aClipView);
GridRowCounter.scrollRectToVisible(aClipView.documentVisibleRect());//
sync the other view
}
}
This code is in my subclass of the 'master' NSScrollview that
encompasses my primary NSTableView.
GridRowCounter is another NSTableView, which also has an NSScrollView
(with all the furniture turned off.)
When I scroll the 'master' NSScrollView, the other one scrolls with it.
Let me know if you need to know anything else.
Cheers
Moray
Hello all!
I currently have a subclass of an NSTableView in which I'm displaying
a whole bunch of columns. Basically, what I'd like to do is keep two
or three columns fixed in place on the left side of my view, and be
able to scroll through the rest of the columns horizontally - the
columns on the left need to be visible all the time.
What is the best way to go about implementing this? Is there a
convenient way to subclass NSTableView to do this, or do I create two
separate tableviews side by side and make them subviews in a
scrollview?
If anyone has any suggestions on how to get started, I'm sure I can
figure it out... just having a hard time deciding what is the best
approach to start hacking away at.
Thanks!
DaveR
_______________________________________________
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.
_______________________________________________
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.