Revision: 56032
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 7, 2012 11:34 by inky76
Initial Code
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; { // other stuff might happen here if ([self showsFirstResponder]) { // showsFirstResponder is set for us by the NSControl that is drawing us. NSRect focusRingFrame = cellFrame; focusRingFrame.size.height -= 2.0f; [NSGraphicsContextsaveGraphicsState]; NSSetFocusRingStyle(NSFocusRingOnly); [[NSBezierPath bezierPathWithRect: NSInsetRect(focusRingFrame, 4.0f, 4.0f)] fill]; [NSGraphicsContext restoreGraphicsState]; } // other stuff might happen here }
Initial URL
Initial Description
Initial Title
Drawing a standard focus ring inside of a cell's bounds
Initial Tags
Initial Language
Objective C