The "outline table column" (see -[NSOutlineView outlineTableColumn]
) is the NSTableColumn that draws the triangle and left padding as needed to display the hierarchy. The default cell for displaying table content is an NSTextFieldCell. To increase the spacing you see, you have to do the drawing in a custom NSTextFieldCell subclass. The spacing is achieved by drawing your image with an x offset. (The outline view will draw the disclosure triangle regardless of which NSCell subclass is used.)
Note that you may have to override the following methods to draw correctly when the cell can be typed in, selected for editing, and the tooltip:
-[NSCell editWithFrame:inView:editor:delegate:event:]
-[NSCell selectWithFrame:inView:editor:delegate:start:length:]
-[NSCell expansionFrameWithFrame:inView:]
By default your custom text rects will be ignored by the text field and these will draw oddly.
Jonathan Dann
2009-09-18 08:30:00