[Q] Trouble setting an image in an NSOutlineView
[Q] Trouble setting an image in an NSOutlineView
- Subject: [Q] Trouble setting an image in an NSOutlineView
- From: Mark de Jong <email@hidden>
- Date: Sat, 24 Aug 2002 20:18:46 -0700
Hi!
I cannot seem to get an NSImageCell to appear in an NSOutlineView.
I set things up with:
aTableColumn = [table tableColumnWithIdentifier:@"icon"];
imageCell = [[NSImageCell alloc] initImageCell:nil];
[aTableColumn setDataCell: imageCell];
[imageCell release];
Then, I add this delegate:
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
{
NSString *identifier = [tableColumn identifier];
if( [identifier isEqual:@"activated"] ) {
NSLog( @"about to set the image" );
[cell setImage:fontIsDamagedImage];
}
}
However, no icon appears.
If, however, I change the second line to:
imageCell = [[NSBrowserCell alloc] initImageCell:nil];
Then my icon appears, with the "disclosure triangle" next to it, which
is not what I'm looking for. I've look through the archives but cannot
seem to find a solution. What's even worse is that I had this working
at one point. I just cannot make it work again. :-)
Does anyone here know how I can make my icon appear using NSImageCell?
Thanks!
-- Mark
_______________________________________________
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.