Re: Focus Rings
Re: Focus Rings
- Subject: Re: Focus Rings
- From: Scott Anguish <email@hidden>
- Date: Mon, 23 Oct 2006 14:35:05 -0400
On Oct 22, 2006, at 7:11 PM, Seth Willits wrote:
On Oct 22, 2006, at 4:01 PM, Seth Willits wrote:
Is there a *good* example of drawing a rectangular focus ring on
a view correctly? The only real complete example I've found (it
was on cocoadev.com) has several problems with it. It either is
ridiculously inefficient in drawing, keeps redrawing the focus
ring ontop of itself so it gets thick and ugly, or doesn't
maintain the focus ring correctly when switching windows, however
I modify it. It seems like one of those simple things, but it's
apparently not simple.
Check out /Developer/Examples/AppKit/ClockControl/
Hmm... Well, I see that they acheived this by using a view larger
than the clock and just drawing the focus rect entirely within the
view, which is kind of cheating, really. :)
In other words, how do you do it without simply making the view
larger?
well, I'd say this falls into the ridiculously inefficient category..
but
what I've been told (by engineering) is that you have to basically
use the NSView method setKeyboardFocusRingNeedsDisplayInRect: and pass
the view's bounds. that'll handle the invalidation correctly.. but you
basically can't use the usual display invalidation methods in that
view at all.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden