How to do a custom cell highlighting…
How to do a custom cell highlighting…
- Subject: How to do a custom cell highlighting…
- From: Quentin Mathé <email@hidden>
- Date: Thu, 10 Apr 2003 18:56:12 +0200
I have a NSActionCell subclass inited with an image and I want to
provide my own highlighting (because the standard highlighting doesn't
highlight my image) when the user clicks on the cell. Then I have
overrided the following method :
- (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView
*)controlView {
NSImage *image = [self image];
[image lockFocus];
if (flag) {
// 1) highlight
}
else {
// 2) restore
}
[image unlockFocus];
}
But I don't know what I should write in 1) to have the cell highlighted
(image included) with the system highlight tint. Perhaps with the
function NSHighlightRect() I tried it but without success.
--
Quentin Mathi
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.