Separate names with a comma.
Discussion in 'Mac Programming' started by detz, Dec 30, 2008.
I see this on a lot of apps so I'm wondering if it's a built in view. Is this just a tableView?
NSOutlineView, or a subclass thereof?
NSOutlineView, with additions and/or a custom cell class for display.
I've basically wrote one of these, and keep extending it to become more and more complete as time goes by. You can get basic functionality pretty easily (the background, selection style, and even the group label font is all supported in the Leopard APIs), but complex stuff like matching some of the functionality of iTunes' lists (auto-indenting of the outline view, badges for item counts or the like, etc) will require some extra code on your part.
If I clean up my code one of these days, I might make it public.
I did something similar a while ago but without the collapsing of rows, all via an NSTableView. Almost everything was handled by an NSCell subclass. It is a fairly ugly implementation though, but I needed compatibility with 10.4 so I couldn't use some of 10.5's methods which would have made it easier.