• 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: NSCell and IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCell and IB


  • Subject: Re: NSCell and IB
  • From: Carlos Weber <email@hidden>
  • Date: Tue, 18 Sep 2001 08:11:29 -1000

On Monday, September 17, 2001, at 03:05 , Enrique Zamudio wrote:

<...>

Regarding the image cell: perhaps you can just use a NSImageCell but
maybe you'll want to use something else, that's up to you. you have to
set it programatically, I think there's a setDataCell: method to let you
replace the data cell that's used in a NSTableColumn. You can also
replace the header cells if you need to.

<...>

Don't forget that the "image" in an NSImageCell can actually draw anything you want via the NSCustomImageRep mechanism. You could subclass NSImage and write just 2 methods: first, a drawing proc for your custom imagerep ( - (BOOL)drawCustomRep: (id)theImageRep ) in which you just draw your text and images as you want them; and second, an override of -initWithSize:, in which you would create a NSCustomImageRep via -initWithDrawSelector: @selector( <the drawing proc you just defined>) delegate: self. Then add the customImageRep to your image as its only imagerep. This would be the image you would assign to the NSImageCell ( -setObjectValue:), which would in turn be assigned as the dataCell of the table view.


References: 
 >Re: NSCell and IB (From: Enrique Zamudio <email@hidden>)

  • Prev by Date: Re: UI improvements (was: cocoa-dev digest, Vol 1 #581 - 19 msgs)
  • Next by Date: Re: NSMovieView uses 3-8% CPU after playing a sound?
  • Previous by thread: Re: NSCell and IB
  • Next by thread: How to add delegate to my application
  • Index(es):
    • Date
    • Thread