1
votes

I am new to cocoa. I will need to implement an NSoutlineview for 10.6 OS X and above. I have hierarchy of data which must be shown in the form of outlineview. The cell for outline view must contain an image and text. Could some body please suggest on how to go a head with this?

thanks

2
Have you already read Apple's documentation on outline views? If so, what are you specifically stuck on? - user149341
I have read Apple documentation. Its easy to do with view based outline view to load an image and text. It is not available with 10.6 version of Osx. So, looking for an example on how an image and text can be inserted with cell based outline view starting from 10.6 mac osx. - user1873452
@user1873452 then look specifically at the first link I posted, it shows how to have image+text in one cell :) - Daij-Djan

2 Answers

0
votes

an outlineview is basically just a tableview so all tutorials for NSTableView apply to it only the dataSource methods differ

so: http://www.martinkahr.com/2007/05/04/nscell-image-and-text-sample/

and combine it will a tutorial of a cell based outline. e.g. http://devcry.heiho.net/2012/02/treeview-in-cocoa-nsoutlineview.html

0
votes

For your best practice you can refer this sample code Sourceview

To customize your text you need to set your cell as ImageAndText cell as shown in that samplecode