Last active
August 29, 2015 13:57
-
-
Save jgold6/9383602 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set the outlineView's hightStyle to "none": | |
| outlineView.SelectionHighlightStyle = NSTableViewSelectionHighlightStyle.None; | |
| Then in the NSOutlineViewDelegate: | |
| public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) | |
| { | |
| uint rowNo = (uint)outlineView.RowForItem(item); | |
| NSColor backgroundColor; | |
| if (outlineView.SelectedRows.Contains(rowNo)) { | |
| backgroundColor = NSColor.Yellow; | |
| } | |
| else { | |
| backgroundColor = NSColor.White; | |
| } | |
| Console.WriteLine("Cell: {0}", cell); | |
| var bCell = (NSTextFieldCell)cell; | |
| bCell.BackgroundColor = backgroundColor; | |
| bCell.DrawsBackground = true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment