I am having an NSBrowser
in one of my windows. It has a checkbox, image and textbox as you see in the screenshot.
I am struggling to do two things:
- Change the row selection color. By default it is blue.
- Action on the checkbox
The checkbox + image + textbox is added to the subclass of NSBrowserCell
like this:
- (instancetype)init
{
self = [super init];
if (self) {
_buttonCell = [[NSButtonCell alloc] init];
[_buttonCell setButtonType:NSButtonTypeSwitch];
[_buttonCell setTarget:self];
[_buttonCell setAction:@selector(cellButtonClick:)];
[_buttonCell setTitle:@""];
_imageCell = [[NSImageCell alloc] init];
_textCell = [[NSTextFieldCell alloc] init];
}
return self;
}
I've added target and Action too, but it is not called.
How do I achieve these two things?
Any guidance will be appreciated.