• 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: Custom highlight selection in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom highlight selection in NSOutlineView


  • Subject: Re: Custom highlight selection in NSOutlineView
  • From: Michael Nickerson <email@hidden>
  • Date: Wed, 20 Sep 2006 13:15:55 -0400


On Sep 20, 2006, at 7:46 AM, David Aames wrote:

Hello there,

I wanted to see which call was responsible for drawing this rectangle so I fired up Shark and it was
-(void)_drawHighlightWithFrame:(NSRect)frame inView:(NSView*)view
After providing an empty implementation everything worked fine but I wonder what's is the proper way of doing it? NSCell docs don't even seem to mention this method (it's private). So the question is what is the proper way to make the NSOutlineView to draw the highlight and leave NSCell alone (ie not request it to draw the highlight). BTW overriding - (void)highlight:(BOOL)flag withFrame: (NSRect)cellFrame inView:(NSView *)controlView (of NSCell) with an empty body doesn't actually fix the problem. Can anyone please clarify the situation (overriding private methods is a Bad Thing (tm)) because I think I'm not the only one having this problem.




Override -highlightColorWithFrame:iView: in a NSCell subclass, and return nil. That will stop the cell from drawing a highlight.



Darkshadow (aka Michael Nickerson)



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Custom highlight selection in NSOutlineView (From: David Aames <email@hidden>)
 >Re: Custom highlight selection in NSOutlineView (From: "Alan Smith" <email@hidden>)
 >Re: Custom highlight selection in NSOutlineView (From: David Aames <email@hidden>)

  • Prev by Date: Core Image developer required
  • Next by Date: Re: How set breakpoint in szone_error?
  • Previous by thread: Re: Custom highlight selection in NSOutlineView
  • Next by thread: How set breakpoint in szone_error?
  • Index(es):
    • Date
    • Thread