Re: How to draw keyboard focus ring around a custom control?
Re: How to draw keyboard focus ring around a custom control?
- Subject: Re: How to draw keyboard focus ring around a custom control?
- From: Ricky Sharp <email@hidden>
- Date: Wed, 11 May 2005 18:28:22 -0500
On May 11, 2005, at 3:06 PM, Sean McBride wrote:
I have a custom NSView subclass and want to draw a focus ring
around it
when it's first responder. I've searched the archives and web and
found
many conflicting ways of doing it. Most involve a C function
NSSetFocusRingStyle(), which I find weird. I see new in 10.3 is
setFocusRingType: but I don't see anything like drawFocusRing:.
(For the
life of me, I can't find any definitive Apple docs on this subject.
Grr.
Must, resist, ugre to rant :) )
In Carbon there is a nice function, DrawThemeFocusRect(), that you
give a
rect and it draws the focus ring.
Surely there is an easy way in Cocoa? :)
Ahh...I may have misread your e-mail. My first reply states how to
do _custom_ focus rings. If you want the standard focus ring around
your custom control, check out the ClockControl sample code.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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