Keyboard Focus Ring
Keyboard Focus Ring
- Subject: Keyboard Focus Ring
- From: Charles Jolley <email@hidden>
- Date: Mon, 5 Aug 2002 16:23:26 -0500
I'm trying to draw a keyboard focus ring around the outside of a text
view. In my drawRect routine, the relevant portion looks something
like:
[NSGraphicsContext saveGraphicsState] ;
NSSetFocusRingStyle(NSFocusRingOnly) ;
[NSBezierPath fillRect: OKExpandRect([self bounds],1)];
[NSGraphicsContext restoreGraphicsState] ;
The problem is that when drawRect: gets called with only a portion of
the rect to be drawn, two bad things happen: 1) the old focus ring does
not get erased, causing the ring to get darker and the faded portion to
eventually become solid and 2) the focus ring appears around just the
portion of the rect to be drawn, so I get focus ring fragments
appearing throughout my text view as the cursor blinks.
As you can see, I am clearly drawing the focusing ring around my ENTIRE
text view, not just the passed rect. So why it is doing this? Is this
a bug? Any ideas how I can work around it?
Thanks!
-C
_______________________________________________
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.