Reputation: 15510
How would you make Rows that are the Top Parent in an Outline View (which is connected to a NSTreeController) display how many children it has in a Text Cell?
If this is a bit confusing here is a Picture of what I mean.
(source: sourceforge.net)
I am talking about the number to the right of one of the rows in the circle, which is displaying how many children the parent has.
Upvotes: 0
Views: 276
Reputation: 40517
You can either make a custom NSCell subclass that will show the child count (you would use your model object itself as the cell's object value, instead of providing a separate string or image), or in your data source method for the outline view you could just include the count along with the title string. Of course, you'll have to use the first option if you want it drawn exactly like the screenshot.
Upvotes: 3