On Tue, Dec 27, 2011 at 10:43 PM, Seth Willits <sli...@araelium.com> 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 (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