Eliminating NSTableView selection highlighting
Eliminating NSTableView selection highlighting
- Subject: Eliminating NSTableView selection highlighting
- From: John Blackburn <email@hidden>
- Date: Tue, 12 Mar 2002 21:11:43 -0800
Hello,
How can NSTableView's default selection highlighting by completely
eliminated?
My custom NSTableView subclass does its own selection highlighting.
Unlike the default NSTableView behavior which selects the entire
background of the cell, my subclass highlights a name and icon within
the cell, like Finder's icon view. This works great, except for one
thing: a single pixel row of the default selection color occasionally
shows at the top and bottom of the selected cell.
What I'm seeing looks like NSTableView
1. highlights the cell's bounds
2. insets the cell's bounds by 1
3. passes the inset bounds to the cell so the cell can draw itself.
I can't find a way around step 2. I've already tried the following:
* use a custom NSCell subclass to erase the cell's bounds before
drawing
* override highlightSelectionInClipRect: with a do-nothing substitute.
* call [self setIntercellSpacing:NSMakeSize(0,0)] to eliminate space
between the rows.
This is not a table grid problem; the grid isn't enabled.
Am I missing something obvious?
Thanks,
John Blackburn
_______________________________________________
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.