Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

detz

macrumors 65816
Original poster
Jun 29, 2007
1,051
0
I see this on a lot of apps so I'm wondering if it's a built in view. Is this just a tableView?
 

Attachments

  • Picture 1.png
    Picture 1.png
    129.1 KB · Views: 59

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
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.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.