How to add add-on to NSTableCellView ?
I want the content to contain 10px, similar to how you did it in plain HTML. (All sides). The text should be vertically centered in the middle.
I am currently doing this in a subclass of NSTextFieldCell. But this does not work correctly.
When I edit text, the edit text field does not use padding from the textfield field.
Image 2: 

Here is the code I have (subclass of NSTextFieldCell )
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { NSRect titleRect = [self titleRectForBounds:cellFrame]; NSAttributedString *aTitle = [self attributedStringValue]; if ([aTitle length] > 0) { [aTitle drawInRect:titleRect]; } } - (NSRect)titleRectForBounds:(NSRect)bounds { NSRect titleRect = bounds; titleRect.origin.x += 10; titleRect.origin.y = 2; NSAttributedString *title = [self attributedStringValue]; if (title) { titleRect.size = [title size]; } else { titleRect.size = NSZeroSize; }
source share