• 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: NSTableView advice ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView advice ...


  • Subject: Re: NSTableView advice ...
  • From: Drew McCormack <email@hidden>
  • Date: Sat, 7 Jun 2003 11:53:09 +0200

On Friday, June 6, 2003, at 06:35 AM, Lloyd Dupont wrote:

I didn't search yet in the doc..
but you might help me faster than I would find ...

I want to display an NSImage in a NSTableView, so i return it from the
'data method'
- (id)tableView :(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
row:(int)row


but all I get displayed is the image descritpion, as a string.
any idea ?
You will need to create your own data cell for the column containing the images. The default is an NSTextFieldCell, and you will want an NSImageCell. Use the NSTableView methods to get the NSTableColumn in question, then use the setDataCell: method to set an NSImageCell as the data cell. You can probably do this in an awakeFromNib: method somewhere.

Hope this helps,
Drew

----------------------------------
Dr. Drew McCormack
Trade Strategist (www.trade-strategist.com)
Stock Market strategy design platform for Mac OS X.
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSTableView advice ...
      • From: Lloyd Dupont <email@hidden>
References: 
 >NSTableView advice ... (From: Lloyd Dupont <email@hidden>)

  • Prev by Date: Very odd ScreenSaverView/setAnimationTimeInterval: problem
  • Next by Date: Populating NSOutlineView Programatically
  • Previous by thread: Re: NSTableView advice ...: solved !...
  • Next by thread: Re: NSTableView advice ...
  • Index(es):
    • Date
    • Thread