• 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
How to make NSImageCell draw an NSImage template in white?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make NSImageCell draw an NSImage template in white?


  • Subject: How to make NSImageCell draw an NSImage template in white?
  • From: Gabriele de Simone <email@hidden>
  • Date: Wed, 07 Sep 2011 12:01:25 -0400
  • Resent-date: Wed, 07 Sep 2011 12:02:13 -0400
  • Resent-from: Gabriele de Simone <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: email@hidden

I'm trying to mimic the following automatic behavior of NSTableView/NSOutlineView:

When drawing NSImageCells that use a "template" NSImage (either because the image name ends with "Template" or because -[NSImage setTemplate:YES] was called), the table view automatically renders the image in white if the table row is currently selected.

I'm looking for a way to tell NSImageCell that it is currently selected, and that the image should be drawn in white. Unfortunately, calling "setHighlighted:YES" does NOT produce the desired effect. I've looked at various NSCellAttributes, but none of those does the trick either.

Can anyone point to a different method?

Thanks,
Gabe


_______________________________________________

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

  • Prev by Date: Re: Printing exception on Lion
  • Next by Date: Re: nonatomic vs atomic assign/retain
  • Previous by thread: Re: Distributed Notification observing change in Lion?
  • Next by thread: [MEET] CocoaHeadsNYC tomorrow (Thu) -- Greg Casamento
  • Index(es):
    • Date
    • Thread