Re: Image in place of NSTableColumn header cell
Re: Image in place of NSTableColumn header cell
- Subject: Re: Image in place of NSTableColumn header cell
- From: Philip Dow <email@hidden>
- Date: Sat, 16 Sep 2006 01:52:45 +0200
Hi Brian,
You can do this without a subclass of NSTableColumn. Subclass
NSTableHeaderCell instead and override drawWithFrame:inView:. When
you do that you'll need to call
drawSortIndicatorWithFrame:inView:ascending:priority: and
drawInteriorWithFrame:inView: from within your method.
Figuring out if the sort descriptor for a particular cell is active
and ascending or descending can be tricky, but as far as I can tell,
you need to know this so you can pass the right data to the draw
indicator method.
If you just need one table column is using this cell, set up an
NSTableColumn IBOutlet and call setHeaderCell: on it in awakeFromNib.
If all of the column headers should use this cell, it's easier to
iterate through an array of the table's columns, happily provided by
NSTableView's tableColumns method.
-Phil
On Sep 16, 2006, at 1:38 AM, Brian Amerige wrote:
Hi all,
I've been browsing around, and just looking for a way to put a
(repeating, x-axis) image in place of an NSTableColumn header cell.
So far (from what I could figure out) I've got a subclass of
NSTableColumn, with a setHeaderCell method (which essentially does
nothing at this point).
Any guidance is appreciated!
Brian Amerige
http://extendmac.com
http://cocoaforum.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden