Re: Custom highlight selection in NSOutlineView
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