Re: NSCell rollover
Re: NSCell rollover
- Subject: Re: NSCell rollover
- From: Andy Lee <email@hidden>
- Date: Tue, 28 Jun 2005 21:44:22 -0400
On Jun 28, 2005, at 9:33 PM, Matt Ball wrote:
I'm attempting to create an NSCell to be used in a tableView
similar to the "Eject" icon in iTunes, Finder, etc. I've got an
NSImageCell? subclass, and I'm dealing with changing the image
depending on if the row is selected in my controller. However, I
can not for the life of me figure out how to implement the rollover
effect for my cell. I've got some mouse tracking set up in my
tableView, and I've determined the row and column using rowAtPoint:
and columnAtPoint:, but I can't figure out how to refer to the cell
that is under the mouse. I know that NSTableView provides a way to
get the NSRect for the cell at the intersection of a row and
column, but I'm not sure exactly how to use that information.
I would try sending the table view a -setNeedsDisplayInRect: message
with that NSRect. When the table view redraws, it will call -
tableView:willDisplayCell:forTableColumn:row:. That's your
opportunity to tell your custom cell to draw itself differently.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden