How to make NSImageCell draw an NSImage template in white?
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