tags:

views:

54

answers:

2

Hello,

I am trying to get something like in this screenshot alt text

in cocoa, I mean a custom list control. Do you know how this kind of things can be done?

Thanks in advance for your help,

Regards,

+4  A: 

This is a simple NSTableView with a redrawn table cell which consists of NSImageView and a fiew customized NSTextFields.

Eimantas
I was wondering something more complex. Thanks for your answer.
AP
+1  A: 

An approach, that's more modern than view hacking NSTableView would be either one of these:

http://github.com/sdegutis/SDListView

SDListView - Clone of NSCollectionView, but with variable-height items and only using a single column.

http://github.com/uliwitness/PXListView

PXListView - An optimized list view control for Mac OS X 10.5 and greater. It was created after I wrote this post on the subject.

PXListView is licensed under the New BSD license.

PXListView uses similar optimizations as UITableView for the iPhone, by enqueuing and dequeuing NSViews which are used to display rows, in order to keep a low memory footprint when there are a large number of rows in the list, yet still allowing each row to be represented by an NSView, which is easier than dealing with cells.

The architecture of the control is based on the list view controls which are present in both Tweetie (Mac) and Echofon (Mac).

The project is still very much a work in progress, and as such no documentation exists at current.

[Edit: it case it wasn't obvious: the class descriptions seen above are quotations of course ;) Where "I" in the latter one actually refers to "Alex Rozanski", not me.]

Regexident
Very interesting! Thanks
AP
Glad I could help.Btw, would you mind leaving a short comment once you've made your choice and elaborate briefly on why you chose SDListView over PXListView? (or vice versa, or maybe even none of both)
Regexident
I've started to implement SDListView. The reason is really simple: just because I prefer its scrollbar.
AP