Re: Highlighting Drag Target
Re: Highlighting Drag Target
- Subject: Re: Highlighting Drag Target
- From: Daniel Todd Currie <email@hidden>
- Date: Wed, 20 Oct 2004 15:28:03 +0900
I just simply call:
[[self superview] display];
However, I am working with a table view, which has some other issues,
namely having a scroller. Perhaps my helpfulness is coming to an end.
-- DTC
On 2004 Oct 20, at 15:05, Dennis Falling wrote:
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