tags:

views:

445

answers:

2

The Apple guidelines talk about using a source list - how do I create this source list, either in Carbon or Cocoa? Is there an official API somewhere for this component?

+1  A: 

The way iCal at least does it appears to be it's own subclass of an NSOutlineView, you'll probably have to create your own method as there is no official API for it.

a quick google reveals the 3rd party solution SourceListView

cobbal
+4  A: 

A source list in Cocoa is just an NSOutlineView configured in a particular way. You can drag one out in Interface Builder and set the highlight mode to Source List. You'll probably also want to turn off the header row, change it to a single column, and change the visible scrollbars on the enclosing NSScrollView.

You'll also need to implement the delegate method to determine which rows should be the "Group Rows":

- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item

Apple provided sample code http://developer.apple.com/samplecode/SourceView demonstrates how to build a fully featured source list.

Joey Hagedorn
Thanks - exactly what I was looking for!
Mark