Skip navigation.
 
mlCustom editable cell on NSOutlineView
FROM : Dorian Johnson
DATE : Sun Nov 04 04:16:19 2007

I have an NSOutlineView that needs each cell to have a small icon and 
be editable.

So far, I've used NSBrowserCell, which does the icon perfectly but 
refuses to work with editing. I also tried the ImageAndTextCell 
sample code from ADC ( http://developer.apple.com/samplecode/
ImageBackground/listing4.html ), which has code in it for editing, 
but it doesn't work either (again, icons and text display properly, 
but editing doesn't function). Editing works fine if I revert to the 
default data cell. Any ideas on how I can get editing and the icon 
working?

Here's how I'm setting the data cell (for NSBrowserCell, on a 
NSOutlineView with one column):
   NSBrowserCell *browserCell = [[[NSBrowserCell alloc] init] 
autorelease];
   [browserCell setLeaf:YES];
   [[[_hierarchyView tableColumns] objectAtIndex:0] 
setDataCell:browserCell];

Related mailsAuthorDate
mlCustom editable cell on NSOutlineView Dorian Johnson Nov 4, 04:16
mlRe: Custom editable cell on NSOutlineView Florent Pillet Nov 4, 23:06
ml[Solved] Re: Custom editable cell on NSOutlineView Dorian Johnson Nov 5, 02:19