• 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: Template Images in Table Cells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Template Images in Table Cells


  • Subject: Re: Template Images in Table Cells
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 28 Dec 2011 00:23:02 -0800

On Tue, Dec 27, 2011 at 10:43 PM, Seth Willits <email@hidden> wrote:
>
> I want to use template images as the icon next to the text for some rows in a table/outline view, as part of the "source list" look. Normally I'd just use full color images, but now that we're being led into monotony by Apple's new look in Lion, I expect to be able to use a template image somehow, and it figures out how to colorize it appropriately. I'm currently drawing the image in my custom cell using [image drawInRect:....], the image is a proper template image (the property is YES etc), but it's still just a grayscale image.
>
> Any idea how to actually get that to work?

If it's a view-based Table or Outline View, hooking up the imageView
outlet from the NSTableCellView should Just Work(TM). All that really
does appearance-wise is change the image view's cell's backgroundStyle
to NSBackgroundStyleRaised, so you can easily do this yourself.
Unfortunately, it has to be done in code since there's no way to set
the backgroundStyle property of a cell using Interface Builder. (If I
haven't filed an enhancement request on that yet, I've been meaning
to.)

--Kyle Sluder
_______________________________________________

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: 
 >Template Images in Table Cells (From: Seth Willits <email@hidden>)

  • Prev by Date: Template Images in Table Cells
  • Next by Date: Re: Template Images in Table Cells
  • Previous by thread: Template Images in Table Cells
  • Next by thread: Re: Template Images in Table Cells
  • Index(es):
    • Date
    • Thread