Re: Icon in NSOutlineView
Re: Icon in NSOutlineView
- Subject: Re: Icon in NSOutlineView
- From: Robert Cerny <email@hidden>
- Date: Thu, 2 Jan 2003 09:09:00 +0100
Hi,
you should check /Developer/Examples/AppKit/DragNDropOutlineView. It
does exactly what you want. Anyway, to set the cell's format use
awakeFromNib method in your controller object.
Robert
On Monday, December 30, 2002, at 07:57 PM, Justin Lundy wrote:
I'm using an NSOutlineView as a file system browser and want to get the
icons for each file to show up next to the item. I looked through the
archives and found that I needed to add two parts to get this to work,
first change the NSCell to an NSBrowserCell, and then add the function
that gives the cell its image.
In the data source I added:
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell forTableColumn:(NSTableColumn
*)tableColumn item:(id)item
{
[cell setImage: [(NSImage *)iconForFile:(NSString *)fullPath]];
}
But Where do I add to following? Should it be in the data source or
the app controller?
[fileColumn setDataCell:[[NSBrowserCell alloc] init]];
Thanks in advance,
Justin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.