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.
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.