• 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
Focus Ring in NSBrowser Column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Focus Ring in NSBrowser Column


  • Subject: Focus Ring in NSBrowser Column
  • From: Micha Fuhrmann <email@hidden>
  • Date: Tue, 01 Jul 2008 13:36:03 +0200

Hi there,

I'm trying to set the focus ring on a 10.4 NSBrowser column for a drag in. I'v tried setting it on the NSMatrix of each column but the focus ring stops where the NSMatrix view stops. So I've sub-classed my NSBrower as such:

- (BOOL)needsDisplay;
{
    NSResponder* resp = nil;
	

shouldDrawFocusRing = (resp != nil && [resp isKindOfClass:[NSView class]]
&& [(NSView*)resp isDescendantOf:self]);
lastResp = resp;
[self setKeyboardFocusRingNeedsDisplayInRect:[[AppController sharedInstance]rectInColumn:0]];
return YES;
}



- (void)drawRect:(NSRect)rect {

	[super drawRect:[[AppController sharedInstance]rectInColumn:0]];

    if ( shouldDrawFocusRing )
    {
        NSSetFocusRingStyle(NSFocusRingOnly);
        NSRectFill([[AppController sharedInstance]rectInColumn:0]);
    }
}

[[AppController sharedInstance]rectInColumn:0] being the NSRect of the column. I've chosen column:0 just for testing purposes

However the NSBrowser still draws its focus ring around its entire view.

Any help greatly appreciated. _______________________________________________

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


  • Follow-Ups:
    • Re: Focus Ring in NSBrowser Column
      • From: "James Murdza" <email@hidden>
  • Prev by Date: Re: Process app.
  • Next by Date: Re: Font related question
  • Previous by thread: Отв.: Process app.
  • Next by thread: Re: Focus Ring in NSBrowser Column
  • Index(es):
    • Date
    • Thread