Re: NSTableView row counter
Re: NSTableView row counter
- Subject: Re: NSTableView row counter
- From: Ryan Bates <email@hidden>
- Date: Sun, 15 Feb 2004 09:11:14 -0800
How about simply putting an NSView subclass next to an NSTableView? If
you have an outlet to the table view you could get information (such as
the row height). The problem is you don't know when to redraw this
view. One way would be to subclass NSTableView as well and tell the
NSView subclass to redraw every time the table is redrawn.
This way is very hack-ish, but it should work. If you are developing a
framework that other programmers will use you will want to think of
something better. The right way to do this would be to subclass
NSTableView and implement the row headers similar to the column
headers, but I think you would need to know more about NSTableView than
the documents provide in order to accomplish this.
Ryan
On Feb 15, 2004, at 6:00 AM, Moray Taylor wrote:
Hi,
I am currently investigating ways to put a row counter onto my
NSTableView, like a spreadsheet. I can't just use the first column, as
it disappears when I scroll horizontally.
I was thinking of using a NSRulerView, as it does everything I need it
to do, apart from the numbers are in the wrong places, and just don't
look the way I want them to. Should I overide the drawRect:, or am I
barking up the wrong tree?
The line counter in XCode's text editor is almost what I want, how is
that done?
Thanks v much
Moray
_______________________________________________
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.