RE: Newbie NSTableView How to get Multicolor Table Cells an Image s
RE: Newbie NSTableView How to get Multicolor Table Cells an Image s
- Subject: RE: Newbie NSTableView How to get Multicolor Table Cells an Image s
- From: "ROSE,ROBERT W (HP-Corvallis,ex1)" <email@hidden>
- Date: Fri, 11 Apr 2003 14:03:49 -0700
Is there any sample code floating around out there that demonstrates all of
the different types of things that you can embed in an NSTableView?
Specifically, I'm looking for good examples of checkboxes, radio buttons,
and progress indicators, AND how to dynamically add and remove these types
at run-time.
?
-robert
>
-----Original Message-----
>
From: Esteban Uribe [mailto:email@hidden]
>
Sent: Thursday, April 10, 2003 9:51 PM
>
To: Chad Eckles
>
Cc: Cocoa
>
Subject: Re: Newbie NSTableView How to get Multicolor Table Cells an
>
Images
>
>
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.
_______________________________________________
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.