Hello list

My NSTextFieldCell subclass is based on ImageAndTextCell.m from the SourceView sample.
This displays text and images in a single cell.

My difficult is in getting system media template images to invert when the cell is highlighted.
The documentation for NSImage - setTemplate states:

You can mark an image as a “template image” to notify clients who care that the image contains only black and clear content.

Yes, I detect that an image is a template, but how do I initiate "caring".

My feeble attempts at getting my client to care have firstly been to try and invert the NSImageRep of the template, but this fails as the image rep is the undocumented NSCoreUIImageRep and not a NSBitmapImageRep.

My second attempt was along the following lines:

[cell setHighlighted:YES];
[cell setState:NSOnState];
NSImage *image = [cell preparedImage];

A modified - duller - image is returned, but not an inverted one.
I think that this is more along the right track. But something's missing (brains probably).

Any enlightenment would be welcome.

Jonathan



_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to