Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to put two NSCells in one?



On Dec 5, 2004, at 2:59 PM, Milton Sagen wrote:
Go look at the example DragNDropOutlineView. In it you'll find the module ImageAndTextCell.m. I think that's all you need.

This was the perfect solution. Thanks very much for your help!

I did try joar's NSButtonCell solution, but it was unsuitable since NSButtonCell renders its textual content differently than NSTextFieldCell, whereas ImageAndTextCell just tacks an NSImage onto the text drawing code.

-- Gwynne, key to the Code
Email: email@hidden
Web: http://musicimage.plasticchicken.com/

On Dec 05, 2004, at 11:17, Gwynne wrote:

I have a situation where I have an NSTableView. I want one of the columns to display both image and text data. It seems to me that the best way to do this is to embed both NSTextFieldCell and NSImageCell into the column's data cell, but I can't quite figure out how this would be accomplished. Another option would be to write an NSTextImageCell subclass, but I'm not at all clear about how one would go about that either. Can anyone give me any advice?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Best way to put two NSCells in one? (From: Gwynne <email@hidden>)
 >Re: Best way to put two NSCells in one? (From: Milton Sagen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.