Custom NSTextFieldCell for NSOutlineView

1k Views Asked by At

I am wondering how to draw a NSTextFieldCell like the one in NetNewsWire.

I have already subclassed a NSTextFieldCell for the group cell and specified it in my PXSourceList's dataCellForItem.

The source list is cell based.

I just don't know how to draw the cells.

NetNewsWire

1

There are 1 best solutions below

1
On

Check out the Apple sample "SourceView", that contains a subclass of NSTextFieldCell called ImageAndTextCell that does what you want.

https://developer.apple.com/library/mac/#samplecode/SourceView/Introduction/Intro.html

Though if it were me, I'd change to using a view based OutlineView and use the built in NSTableCellView which already supports an imageView.