开发者

Choosing between NSTableView and NSOutlineView

I'd really like to create a table view that is segmented similar to the screen shown

Choosing between NSTableView and NSOutlineView

( which is taken from the XCode->Build Phases view ). To be honest, I'm a bit lost on how to start there.

I could use a NSTableView + a custom NSTableCellView that manages the expanding/collapsing behaviour, but I'm entirely not sure if the resizing of an individual row is possible or permitted ( the doc isn't too verbose here ).

The second approach would be to choose a NSOutlineView to accomplish this behaviour, yet it would require some serious subclassing to get where I'd like to go.

So, before I'm doing it wrong again, what would you do? Thanks a lot for your time

– Mor开发者_如何转开发itz


I am quite sure that is an NSOutlineView (not sure if is one big outline or 4). The subclassing isn't as hard as it looks. The only item that requires custom drawing is the root element (that's the row with the disclosure triangle.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜