rustylepord
rustylepord

Reputation: 5801

Hover effect issue in NSTableView

I have a view based NSTableView in my application and I have added the hovering effect for the rows using the implementation in HoverTableDemo. I can get the hovering effect when the mouse is over a row without a problem , however when the tableview is scrolled down sometimes it leaves highlighting effect on the top cells when the table view is scrolled up again. I think this is due to NSTableView reuses the cell. I highlight the row by overriding the

 - (void)drawBackgroundInRect:(NSRect)dirtyRect

method in NSTableRowView. Could someone point me to the right direction to solve this issue ?

Thanks in advance .

Upvotes: 3

Views: 826

Answers (1)

ShettyRahul
ShettyRahul

Reputation: 1

I think it is because the mouseExit event does not get called on scrolling and hence the background is not reset.

Upvotes: 0

Related Questions