Re: Icon in NSOutlineView (Solved)
Re: Icon in NSOutlineView (Solved)
- Subject: Re: Icon in NSOutlineView (Solved)
- From: Justin Lundy <email@hidden>
- Date: Tue, 31 Dec 2002 15:03:34 -0800
Figured it out: In the App controller in awakeFromNib.
Actual code varied somewhat.
- Justin
On Monday, December 30, 2002, at 10:57 AM, 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.