On 2009 Apr 24, at 11:55, Arun wrote:

Does any one know how to bind Image and Text into a NSTextFieldCell?

I don't believe you can do that with NSTextFieldCell.

I believe this would work: First of all add or identify a single 'foo' attribute in your data object model from which both data and text can be extracted. Set up your bindings in the normal way: Bind the table column's 'value' through an array controller to arrangedObjects.foo. Then subclass NSCell, overriding - drawInteriorWithFrame:inView: to extract the image and text from - objectValue and draw them where you want them. In the table column's - dataCellForRow:, return an instance of this NSCell subclass.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to