Re: NSTableView advice ...
Re: NSTableView advice ...
- Subject: Re: NSTableView advice ...
- From: Lloyd Dupont <email@hidden>
- Date: Tue, 10 Jun 2003 09:22:06 +1000
thanks, I had just found BTW :-)
On Saturday, June 7, 2003, at 07:53 PM, Drew McCormack wrote:
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.