Re: NSOutlineView Items Like iTunes 7.4
Re: NSOutlineView Items Like iTunes 7.4
- Subject: Re: NSOutlineView Items Like iTunes 7.4
- From: "Igor Mozolevsky" <email@hidden>
- Date: Wed, 19 Sep 2007 15:28:43 +0100
On 19/09/2007, Michael Larbi <email@hidden> wrote:
>
> Hi Clint,
>
> Thanks for the response. I found a rather elegant solution with
> Leopard version of NSOutlineView. The following has been added in
> NSOutlineView.h
>
> #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
>
> /* Returns the frame of the outline cell for a particular row,
> considering the current indentation and indentationMarkerFollowsCell
> value. If 'row' is not an expandable row, it will return NSZeroRect.
> This method can be overridden by subclassers to return a custom frame
> for the outline button cell. If an empty rect is returned, no outline
> cell will be drawn for that row.
> */
> - (NSRect)frameOfOutlineCellAtRow:(NSInteger)row;
>
> #endif
>
> So by overriding this method in my subclass of NSOutlineView I was
> able to return NSZeroRect for rows where I don't want the disclosure
> triangle. That worked fine.
Sounds pretty hacky... Is -(int)levelForItem:(id)item not the thing you
actually want?..
--
Igor M.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden