• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to draw keyboard focus ring around a custom control?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to draw keyboard focus ring around a custom control?


  • Subject: How to draw keyboard focus ring around a custom control?
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 11 May 2005 16:06:19 -0400
  • Organization: Rogue Research

Hi all,

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? :)

Thanks!

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

  • Follow-Ups:
    • Re: How to draw keyboard focus ring around a custom control?
      • From: Scott Anguish <email@hidden>
    • Re: How to draw keyboard focus ring around a custom control?
      • From: Ricky Sharp <email@hidden>
    • Re: How to draw keyboard focus ring around a custom control?
      • From: Alastair Houghton <email@hidden>
    • Re: How to draw keyboard focus ring around a custom control?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: NSTask hangs if there is no running run loop
  • Next by Date: Re: How to draw keyboard focus ring around a custom control?
  • Previous by thread: Re: NSTask hangs if there is no running run loop
  • Next by thread: Re: How to draw keyboard focus ring around a custom control?
  • Index(es):
    • Date
    • Thread