• 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
Re: NSTextFieldCell - Kidnapped Focus Ring!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextFieldCell - Kidnapped Focus Ring!


  • Subject: Re: NSTextFieldCell - Kidnapped Focus Ring!
  • From: Joel Norvell <email@hidden>
  • Date: Wed, 30 Jul 2008 16:52:55 -0700 (PDT)

Hi Seth,

My experience with focus rings has always been with NSView subclasses, not with cells.  And my focus rings have always been drawn outside their views, adorning them, as it were.  In the past, I have had to invalidate the focus ring's area with setKeyboardFocusRingNeedsDisplayInRect in order to to get them to draw, because I was doing something non-standard.  Also I've always used NSFocusRingTypeExterior.

Here's some code I've used to draw focus rings "by hand":

- (void) drawFocusRing
{
    [NSGraphicsContext saveGraphicsState];

    [[NSColor keyboardFocusIndicatorColor] set];

    NSSetFocusRingStyle(NSFocusRingOnly);
    [[NSBezierPath bezierPathWithRect:[self bounds]] fill];

    [NSGraphicsContext restoreGraphicsState];
}

I doubt that this will be of much help, but since no one else has taken a shot at your question, I wanted "to keep the ball in the air," so to speak.

Sincerely,
Joel





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Checking for hackintosh
  • Next by Date: Re: Checking for Hackintosh
  • Previous by thread: NSTextFieldCell - Kidnapped Focus Ring!
  • Next by thread: Checking for hackintosh
  • Index(es):
    • Date
    • Thread