Re: NSOutlineView variable width cell
Re: NSOutlineView variable width cell
- Subject: Re: NSOutlineView variable width cell
- From: "I. Savant" <email@hidden>
- Date: Thu, 14 Sep 2006 14:35:32 -0400
On Sep 14, 2006, at 2:12 PM, Ashley Clark wrote:
Well, the gradients are nice but that's not really what I'm
interested in.
Oh. :-)
Essentially, I want some rows to have one full-width column while
other rows will have three columns. Or at least that's the
appearance I want.
Ah hah! Now I understand what you meant about ignoring the layout ...
The Spotlight results window still uses a fixed number of columns.
The difference is that the cells in the "header" rows are "blank" and
uneditable for the date and "info button" columns.
You can accomplish this by using custom NSCells and
NSOutlineView's delegate methods (such as -
outlineView:willDisplayCell:forTableColumn:item: and -
outlineView:willDisplayOutlineCell:forTableColumn:item:) to swap the
data cells with 'blank' cells for each row/column as they're
displayed. OR you can use a custom cell that has an "isHeader" value,
which draws the gradient and no value, and is uneditable if true.
There's a couple of approaches and I have no idea which is
'better', but the first one I mentioned is how I did this. :-)
--
I.S.
_______________________________________________
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