Re: Newbie NSTableView How to get Multicolor Table Cells an Images
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.