views:

182

answers:

1

I like the look of the group rows in the nstableview. In apple mail, the group sections like mailboxes and rss with that style too.

Is there an easy way to make a group row or root item in an nsoutlineview to look like that? I think I have to override the willDisplayCell method...

+1  A: 

Is there an easy way to make a group row or root item in an nsoutlineview to look like that?

I'm not sure why Rob Keniger deleted his answer; it's almost perfectly accurate. I repost it here with one clarifying change:

You need to implement the -outlineView:isGroupItem: delegate method [in your outline view's delegate] and return YES for items that are group items.

(He said “delegate method of NSOutlineView”, which I think was simply him accidentally writing something different than what he was thinking.)

If he undeletes it, you should give him the credit for it.

Peter Hosey
haha that's funny. I use it in a tableview and my code was bad to return a YES so it was always returning a NO. I thought it just didnt display the same way. THANKS!!!
joels