How to change the background color of an NSPopupButton?
问题 I am trying to tackle a problem which sounds pretty simple: changing the background color of an NSPopupButton. Interface Builder only allows changing the style to a pre-defined one and doesn't allow changing the background color. Also, setting up an IBOutlet didn't help since NSPopupButton doesn't have a setBackgroundColor method. I also tried subclassing NSPopupButton to override the drawRect method. Here's what I have tried: - (void)drawRect:(NSRect)dirtyRect { [[NSColor redColor] setFill];