views:

16

answers:

1

I want to change a outline view , and add checkbox cell in front of node , and the node have a icon and how to add checkbox in head of the icon?

+1  A: 

Download the DragNDropOutlineView sample code from Apple and have a look. It contains all the features you're looking for.

As for adding cells, think of it more in terms of adding columns (a column is designed to hold one cell of a single type). If you want more controls in each row, add a new column and set its cell type. Both of these actions can be performed easily in Interface Builder. You can select the table and increase its column count by one (a new column will appear), move the column where you want it (to the beginning), and drag a checkbox-configured button cell (there's a checkbox cell in the IB palette) into the body of the column and its "data cell" prototype will be set. That's it. Just wire it up as you normally would (NSTableViewDataSource or Cocoa Bindings) and you're done.

Joshua Nozzi