Re: HI approved border highlight for active frame
Re: HI approved border highlight for active frame
- Subject: Re: HI approved border highlight for active frame
- From: Jim Correia <email@hidden>
- Date: Mon, 5 Aug 2002 21:51:45 -0400
On Monday, August 5, 2002, at 09:28 PM, John Nestor wrote:
Could somebody point me to docs on adding highlight borders to
active views. I know how to determine the
active (key) view. I don't know how to draw the approved highlight
indication. I am assuming that it looks
like the focus ring around an active text field.
The method
-(void)setKeyboardFocusRingNeedsDisplayInRect:(NSRect)rect
sounds appropriate for invalidating the focus ring. However, I
don't know the dimensions of the
focus ring hence I don't know how to draw it.
You change the graphics focus style, and just draw. To draw a rectangle:
[NSGraphicsContext saveGraphicsState];
NSSetFocusRingStyle(NSFocusRingOnly);
[[NSBezierPath bezierPathWithRect: [self bounds]] fill];
[NSGraphicsContext restoreGraphicsState];
Jim
_______________________________________________
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.