• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Highlighting Drag Target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Highlighting Drag Target (From: Dennis Falling <email@hidden>)
 >Re: Highlighting Drag Target (From: Clark Cox <email@hidden>)
 >Re: Highlighting Drag Target (From: Dennis Falling <email@hidden>)
 >Re: Highlighting Drag Target (From: Daniel Todd Currie <email@hidden>)
 >Re: Highlighting Drag Target (From: Daniel Todd Currie <email@hidden>)
 >Re: Highlighting Drag Target (From: Dennis Falling <email@hidden>)

  • Prev by Date: Re: Newbie question on tableview
  • Next by Date: Re: Custom view and framework bug
  • Previous by thread: Re: Highlighting Drag Target
  • Next by thread: Re: Highlighting Drag Target
  • Index(es):
    • Date
    • Thread