• 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 [solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Metal window pattern color
  • Next by Date: Subclassing NSTableView
  • Previous by thread: Re: Highlighting Drag Target
  • Next by thread: Hot (well, thread-safe) or not?
  • Index(es):
    • Date
    • Thread