• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Images in table headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: SmallSockets
  • Next by Date: Internet Protocol Helper Applications
  • Previous by thread: Re: SmallSockets
  • Next by thread: Internet Protocol Helper Applications
  • Index(es):
    • Date
    • Thread