[SOLVED] NSMatrix doesn't highlight correctly
[SOLVED] NSMatrix doesn't highlight correctly
- Subject: [SOLVED] NSMatrix doesn't highlight correctly
- From: Michael Becker <email@hidden>
- Date: Fri, 12 Mar 2004 09:53:17 +0100
- (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView
*)controlView
{
if ([self isHighlighted] && ([ self image] != nil)) {
[[NSColor selectedControlColor] set];
NSRectFill (frame);
} else {
[[NSColor whiteColor] set];
NSRectFill (frame);
}
[super drawInteriorWithFrame:frame inView:controlView];
}
Adding this to the NSImageCell subclass solved the problem:
- (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView
*)controlView
{
[ self setHighlighted:flag];
}
I don't know why one has to implement this manually, but now everything
works :-)
Regards,
Michael
_______________________________________________
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.