0
votes

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
Which cells are you trying to draw? The cells with the arrows pointing at them or the cells that have an orange gradient background?Michael Dautermann
The cells with the arrows pointing at them.Souljacker

1 Answers

0
votes

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.