I am creating an OutlineView like this:
And I want to achieve a view which looks like this:
The 2 issues that I am facing are:
I cant find a way to move the disclosure triangle between the folder icon and the name.
I am unable to setup the "P" icon for the child nodes.
For the 2nd issue, this is the code I tried setting up the icon with:
- (void)outlineView:(NSOutlineView *)aTableView willDisplayCell:(NSCell*)aCell forTableColumn:(NSTableColumn *)aTableColumn item:(id)item
{
NSImage* image = nil;
BOOL isLeaf = [item isLeaf];
if ([[aTableColumn identifier] isEqualToString:@"styleIcon"]) {
if (aTableView == _charOutlineView) {
image = [QXPGeneralInterfaces imageFor:(isLeaf ? kCharacterIconImage : kFolderIconImage)];
}
else {
image = [QXPGeneralInterfaces imageFor:(isLeaf ? kParagraphIconImage : kFolderIconImage)];
}
if (image != nil) {
[aCell setImage:image];
}
}
aCell does set the image but somehow it disappears in the UI.
I cant find a way to move the disclosure triangle between the folder icon and the name.
Put the folder icon in column 0 and the title in column 1. Set outlineTableColumn
(or the Outline Column in IB) to column 1.