• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Binding Image and Text into a NSTextFieldCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding Image and Text into a NSTextFieldCell


  • Subject: Re: Binding Image and Text into a NSTextFieldCell
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 24 Apr 2009 13:46:46 -0700


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Binding Image and Text into a NSTextFieldCell (From: Arun <email@hidden>)

  • Prev by Date: Re: Core Data and the Application Delegate
  • Next by Date: problems with live resize of NSTextView
  • Previous by thread: Binding Image and Text into a NSTextFieldCell
  • Next by thread: problems with live resize of NSTextView
  • Index(es):
    • Date
    • Thread