RE: Icons in NSOutlineView
RE: Icons in NSOutlineView
- Subject: RE: Icons in NSOutlineView
- From: "Jared White" <email@hidden>
- Date: Thu, 31 May 2001 11:35:45 -0700
Hi Eric,
Thanks, that worked great! I had to use [cell setLeaf:YES] get rid of the
right arrow at the end of each item, but other than that your example worked
like a charm.
Thanks again,
Jared
>
-----Original Message-----
>
From: Eric Peyton [mailto:email@hidden]
>
>
Set your NSOutlineView to use NSBrowserCells instead of standard
>
NSCells.
>
>
Code like this should work for you ...
>
>
[column setDataCell:[[NSBrowserCell alloc] init]];
>
>
(where column is the column in the outline view you want to have
>
the icon ...
>
>
Then later in your outline view delegate when you "fill in" the cell
>
>
- (void)outlineView:(NSOutlineView *)outlineView
>
willDisplayCell:(id)cell forTableColumn:(NSTableColumn
>
*)tableColumn item:(id)item
>
{
>
[cell setImage:someImage];
>
}
>
>
No subclassing required.
>
>
Eric