Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

paos

macrumors newbie
Original poster
Aug 13, 2009
15
0
I'm subclassing NSTableview so rows will highlight when mouse is over, I'm using mouseEntered: and mouseExited: but they never get called, the only method that gets called is mouseMoved:; I'm not really sure about whats happening, please help.
 
I'm subclassing NSTableview so rows will highlight when mouse is over, I'm using mouseEntered: and mouseExited: but they never get called, the only method that gets called is mouseMoved:; I'm not really sure about whats happening, please help.

I think you have to add a trackingRect to the view. Otherwise it doesn't know that you are interested in these events, let alone whether the mouse is inside or outside.
 
Thanks :) I have trackingRect on awakefromnib, but ir seems it works for the entire tableview, hoy can I make it work for each row??
 
trackingRect:

How con I set up a custom tableView to create trackingRects for every row??
 
How con I set up a custom tableView to create trackingRects for every row??

Create your own custom cell and do the tracking in that?
Or maybe this?
tableView:shouldTrackCell:forTableColumn:row:

(Did you look around in the documentation?)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.