Search code examples
macosswiftosx-yosemitenstableview

NSTableView with menu, how to change the border color with right click?


NSTableView with attached NSMenu.

Upon right clicking on the table view, the menu will appear. With it, the table view will highlight the row with a colored border.

Using the HoverTableDemo from the Mac Developer Library as a reference point.

The default color corresponds to the user preference from System Preference -> General -> Highlight color.

Q: How can this border color be changed/removed?

enter image description here


Solution

  • Add this to your TableView

    - (void)drawContextMenuHighlightForRow:(NSInteger)row;
    {
    
    }