• 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
Re: Newbie NSTableView How to get Multicolor Table Cells an Images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie NSTableView How to get Multicolor Table Cells an Images


  • Subject: Re: Newbie NSTableView How to get Multicolor Table Cells an Images
  • From: Esteban Uribe <email@hidden>
  • Date: Thu, 10 Apr 2003 21:51:08 -0700

Hi,

On Thursday, April 10, 2003, at 05:46 PM, Chad Eckles wrote:

Can anyone send me an example on how to make the Table Cells in a
NSTableView multicolored ?

I don't have one right here handy but basically make your controller a delegate
of NSTableView and implement the delegate method
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex

Also I have my Table which Is fill with data from an array how can I add
images so they show next to the Table Cell next to the Text ?

The easiest way would be to add a column for the image, and make the datasource method
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex

just return an NSImage for that cell :)

The other way is to embed an NSTextAttachment in an attributed string...
Check out this message for info on that. <http://cocoa.mamasam.com/COCOADEV/2003/04/1/60696.php>

Also http://cocoa.mamasam.com is a good place to search all the previous postings to the list :-)
You can find some great answers to frequently asked questions there too :-)

Hope this helped
-Esteban Uribe
_______________________________________________
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.

References: 
 >Newbie NSTableView How to get Multicolor Table Cells an Images (From: Chad Eckles <email@hidden>)

  • Prev by Date: Re: How to find "RECOMMENDED APPLICATION/PREFERRED APPLICATION" to open an Image?
  • Next by Date: Re: Binary Differencer/Patcher for OS X?
  • Previous by thread: Newbie NSTableView How to get Multicolor Table Cells an Images
  • Next by thread: Placing SimpleTreeData for NSOutline on pasteboard
  • Index(es):
    • Date
    • Thread