Re: Custom Cells in NSTableView
Re: Custom Cells in NSTableView
- Subject: Re: Custom Cells in NSTableView
- From: Nick <email@hidden>
- Date: Tue, 04 Mar 2003 13:18:24 -0500
Hello.
Basically you subclass the NSCell class. The developer's package comes
with an example for this ... (I think it is the grad-and-drop
example)... they implemented there text and images in a subclass of
NSCell and placed it in an outline view.
So, you subclass the NSCell and you override the - (void) drawInFrame:
(NSRect) frame method. If you want to your cells to respond to mouse
events, maybe you will be better off to subclass the NSActionCell
class. In the - (void) drawInFrame: (NSRect) method you will probably
use the NSString's drawAtPoint: (NSPoint *) withAttributes:
(NSDictionary * ) dict...
You can also search for an email I posted last week "Subject: custom
cell drawing" with a question about the same thing, AND read the follow
up to it (because I had a bug).
Good luck,
Nick Hristov
On Monday, March 3, 2003, at 01:48 PM, Krevnik wrote:
>
Hey All,
>
>
I have a quick question concerning table views...
>
>
In particular, I would like to generate cells similar to how Safari
>
does the download manager. I know the image and control on either side
>
of the progress bar can be done in separate columns, but the text
>
mixed with the bar... any tips/tutorials/links on this particular
>
subject?
>
_______________________________________________
>
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.