Overlapping focus rings, clipping?
Overlapping focus rings, clipping?
- Subject: Overlapping focus rings, clipping?
- From: arekkusu <email@hidden>
- Date: Mon, 23 Jun 2003 02:02:03 -0700
I am having trouble getting the focus ring on my custom control to look
correct.
My control has the following shape
O====O
and is drawn in three parts by one cell; the middle bar and the two end
circles.
The problem is that when the system draws the focus ring, the ring from
each piece bleeds over the other pieces. I have looked through every
post in the archives concerning "focus ring" and the custom clock
control sample code and can not figure out how to fix this problem.
I tried setting clipping paths for each piece, but the focus ring
drawing cheerfully ignores them.
NSFocusRingStyle() seems to be missing a key enumeration--
NSFocusRingNone. If I had that, I could disable the OS drawing
behavior, and then draw my own custom focus path with NSFocusRingOnly.
This would be a terrible hack, since I'd have to approximate the
outline of my bitmaps with a curve, but it would at least get me one
solid shape. I tried setShowsFirstResponder:NO, but it doesn't do
anything for me.
What I really want is a way to tell the system to buffer my control
drawing and only draw the focus ring when I'm done. Is there any such
API? Creating a temporary NSImage to draw into is pretty costly I'm
afraid since this is for a resizable control that may be instantiated
dozens of times per window...
thanks in advance for any help.
-alex
_______________________________________________
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.