Re: Highlighting Drag Target
Re: Highlighting Drag Target
- Subject: Re: Highlighting Drag Target
- From: Dennis Falling <email@hidden>
- Date: Wed, 20 Oct 2004 01:05:15 -0500
Okay, I tinkered around and got it to do highlight it exactly how I want it to. Now the problem is to make the highlighting go away. Here's my code:
- (void)drawRect:(NSRect)rect
{
NSBezierPath *path = [NSBezierPath bezierPathWithRect:rect];
if (highlighted)
{
[super drawRect:rect];
NSSetFocusRingStyle(NSFocusRingTypeDefault);
[path fill];
}
else
{
[super drawRect:rect];
}
}
I've tried numerous things to try to clear it, including drawing over it, restoring state, etc. but part of the border will still remain. I read online that it could be the alpha blend, but didn't find any suggestions that fix it.
Ideas?
-dennis
On Oct 19, 2004, at 10:23 PM, Daniel Todd Currie wrote:
NSRect highlightRect = [self convertRect:[self visibleRect] toView:[[self window] contentView]];
NSFrameRectWithWidth(highlightRect, 2);
_______________________________________________
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