Re: NSTextFieldCell - Kidnapped Focus Ring!
Re: NSTextFieldCell - Kidnapped Focus Ring!
- Subject: Re: NSTextFieldCell - Kidnapped Focus Ring!
- From: Joel Norvell <email@hidden>
- Date: Wed, 30 Jul 2008 16:52:55 -0700 (PDT)
Hi Seth,
My experience with focus rings has always been with NSView subclasses, not with cells. And my focus rings have always been drawn outside their views, adorning them, as it were. In the past, I have had to invalidate the focus ring's area with setKeyboardFocusRingNeedsDisplayInRect in order to to get them to draw, because I was doing something non-standard. Also I've always used NSFocusRingTypeExterior.
Here's some code I've used to draw focus rings "by hand":
- (void) drawFocusRing
{
[NSGraphicsContext saveGraphicsState];
[[NSColor keyboardFocusIndicatorColor] set];
NSSetFocusRingStyle(NSFocusRingOnly);
[[NSBezierPath bezierPathWithRect:[self bounds]] fill];
[NSGraphicsContext restoreGraphicsState];
}
I doubt that this will be of much help, but since no one else has taken a shot at your question, I wanted "to keep the ball in the air," so to speak.
Sincerely,
Joel
_______________________________________________
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