Re: Highlighting Drag Target [solved]
Re: Highlighting Drag Target [solved]
- Subject: Re: Highlighting Drag Target [solved]
- From: Dennis Falling <email@hidden>
- Date: Thu, 21 Oct 2004 03:50:23 -0500
Hey all, a friend of mine figured it out... Here's the code:
- (void)drawRect:(NSRect)rect
{
if (highlighted)
{
[super drawRect:rect];
[NSGraphicsContext saveGraphicsState];
NSRect focusRingFrame = rect;
NSSetFocusRingStyle(NSFocusRingTypeExterior);
[[NSBezierPath bezierPathWithRect: NSInsetRect(focusRingFrame,4)] stroke];
[NSGraphicsContext restoreGraphicsState];
}
else
{
[super drawRect:rect];
}
}
Thanks for all the help!
-dennis falling
On Oct 20, 2004, at 12:23 PM, Dennis Falling wrote:
Ah yes, my app very much hates that call - it crashes. It acts the same as when I accidentally called [self drawRect] inside [self drawRect]. (oops).
Thanks for all your effort,
-dennis
On Oct 20, 2004, at 2:39 AM, Dennis Falling wrote:
Ah yes, my app very much hates that call - it crashes. It acts the same as when I accidentally called [self drawRect] inside [self drawRect]. (oops).
Thanks for all your effort,
-dennis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden