简体   繁体   中英

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?

在此输入图像描述

Add this to your TableView

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

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM