Where are you hosting this custom+composite NSCell subclass?
-setHighlighted:YES isn't what you are looking for. From the documentation:
By default, this method does nothing.
The NSButtonCell class overrides this
method to draw the button with the
appearance specified by
NSCellLightsByBackground,
NSCellLightsByContents, or
NSCellLightsByGray.
Typically the host view for a cell will set the cell's background style, and the cell will use that at draw time to display itself appropriately. Propagate the background style from the master cell to the sub-cells.
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
NSRect textRect, popUpRect;
NSDivideRect(cellFrame, &textRect, &popUpRect, NSWidth(cellFrame) / 2, NSMinXEdge);
/* Draw the text cell (self) */
[super drawInteriorWithFrame: textRect inView: controlView];
/* Draw our compound popup cell - create & release every time drawn only in example */
NSPopUpButtonCell *popUpCell = [[NSPopUpButtonCell alloc] initTextCell: @"popup title"];
[popUpCell setBordered: NO];
[popUpCell setBackgroundStyle: [self backgroundStyle]];
[popUpCell drawWithFrame: popUpRect inView: controlView];
[popUpCell release];
}
If you are hosting this composite cell in an NSTableView, that should be sufficient to get the correct background for selected rows.
If you are hosting this in your own view, you may need to do additional work. (And need to provide additional details about the host environment before we can offer advice.)