Images in table headers
Images in table headers
- Subject: Images in table headers
- From: David Sinclair <email@hidden>
- Date: Sat, 26 Oct 2002 21:40:57 -0700
How can I add an image to a table header? I tried the following, and
it does put the images there, but uses an all-white background rather
than the proper header button-like style. I looked in the
documentation and archive, and it looks like I need to use a
NSTableHeaderCell, but that doesn't support images. I believe there
should be a way, as Mail appears to use images in some of its column
headers (though being an Apple app, it may be undocumented?).
NSTableColumn *column = [sampleTableView
tableColumnWithIdentifier:@"Sample"];
NSImage *image = [NSImage imageNamed:@"Sample"];
NSImageCell *cell = [[[NSImageCell alloc] initImageCell:image]
autorelease];
[column setHeaderCell:cell];
--
David Sinclair - email@hidden
Let Simon keep an eye on your sites for changes or failures!
http://www.dejal.com/simon/
_______________________________________________
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.