>From the sample code in ClockControl.m :
// If we have focus, draw a focus ring around the entire cellFrame (inset it a
little so it looks nice).
if ([self showsFirstResponder]) {
// showsFirstResponder is set for us by the NSControl that is drawing us.
NSRect focusRingFrame = clockRect;
focusRingFrame.size.height -= 2.0;
[NSGraphicsContext saveGraphicsState];
NSSetFocusRingStyle(NSFocusRingOnly);
[[NSBezierPath bezierPathWithRect: NSInsetRect(focusRingFrame,4,4)] fill];
[NSGraphicsContext restoreGraphicsState];
}
----- Original Message -----
From: "Peter Hudson" <[email protected]>
To: [email protected]
Sent: Saturday, June 18, 2011 3:32:49 AM
Subject: Drawing focus rings
I need to draw a focus ring ( or something that looks like a focus
ring ) around a group of rows in an NSTableView.
Drawing a rectangle with NSBezierPath works fine - how do I make it
look like a focus ring ?
Peter
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com
This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]