There is no official way to do this, unfortunately.
There is a way to do it which, though it doesn’t use any private methods, relies on the way NSComboBoxes are implemented internally, and that could change at any time. This would probably would not be acceptable in the App Store.
If you subclass NSComboBoxCell and implement the NSTableViewDelegate method tableView:willDisplayCell:forTableColumn:row:
, you can modify the text cell before it is displayed in the combo box’s popup window.
- (void)tableView:(NSTableView *)tableView
willDisplayCell:(NSCell *)cell
forTableColumn:(NSTableColumn *)tableColumn
row:(NSInteger)rowIndex
{
[cell setTruncatesLastVisibleLine:YES];
[cell setLineBreakMode:NSLineBreakByTruncatingMiddle];
}
This works because the popup list is implemented internally with an NSTableView, and the table view’s delegate is set to the popup cell.