I need a column in my NSTableView with cells that contain both an image and some text.

My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextFieldCell. Basically, I would imagine would override:

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView

and have it call drawWithFrame on the internal image cell and text cell with the appropriate frames.

Then, assuming I am on the right track, is it also then correct that what

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn: (NSTableColumn*)aTableColumn row:(NSInteger)rowIndex

would return is what NSCell's setObjectValue gets called with? Can't think of any reason why this wouldn't be the case...

Thank you.


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to