Skip to content

Commit

Permalink
Automagically expand the first item in the outline view
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Palmer committed Oct 2, 2008
1 parent 0b806fc commit cb99872
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions GNTreeDataSource.m
Expand Up @@ -44,5 +44,14 @@ - (void)outlineView:(NSOutlineView *)sender willDisplayCell:(id)cell forTableCol
[newTitle release];
}
}

- (NSCell *)outlineView:(NSOutlineView *)sender dataCellForTableColumn:(id)cell item:(id)item
{
if([item isHeading])
return [[[NSTextFieldCell alloc] init] autorelease];

return nil;
}

@end

1 change: 1 addition & 0 deletions controllers/TreeController.rb
Expand Up @@ -18,5 +18,6 @@ class TreeController < OSX::NSObject

def awakeFromNib
@tree_outline.setDelegate(@tree_data_source)
@tree_outline.expandItem(@tree_outline.itemAtRow(0))
end
end

0 comments on commit cb99872

Please sign in to comment.