I’m using NSOutlineView for a project, and can’t seem to figure out two things:
- How to remove the disclosure triangle for tree nodes. Apps like iTunes seem to be able to do this:

Is there some sort of NSOutlineView Delegate method that is used for this? Or does it require a subclass?
- How to disable indenting for items. I’ve tried using setIndentationPerLevel: and setting it to 0, as well as changing the column indent to 0 in Interface Builder, but it does not seem to have any effect.
You’ve run into the right person here. I’ve had to grapple with this just a week ago.
Removing the disclosure triangle: implement the
frameOfOutlineCellAtRow:method in yourNSOutlineViewsubclass and returnNSZeroRect(only if you want to hide that particular row’s triangle, of course.)Disable indenting: the outline view’s standard layout reserves space at the far left to draw the triangles in, in case the item is expandable. But you can override that for individual items by specifying a different drawing frame. You also do that in your subclass, by responding to this message: