Re: NSOutlineView group item - suppress ugly show/hide "button" ?
Re: NSOutlineView group item - suppress ugly show/hide "button" ?
- Subject: Re: NSOutlineView group item - suppress ugly show/hide "button" ?
- From: Quincey Morris <email@hidden>
- Date: Fri, 10 Aug 2012 22:48:40 -0700
On Aug 10, 2012, at 22:18 , Graham Cox <email@hidden> wrote:
> In my outline view I return NO for a certain row from the delegate method [outlineView:shouldCollapseItem:], which is also set to be a 'group' item. This does prevent the group item being collapsed correctly, but it still shows that horrible 'show'/'hide' button - it's just that it no longer actually does anything.
I think you want delegate method 'outlineView:shouldShowOutlineCellForItem:'.
> Is there a way to get rid of this button? I would have thought that if the row couldn't be collapsed the button should be automatically suppressed, but it's not.
1. There's a difference between "shouldn't" [right now] and "can't" [ever].
2. I believe "shouldn't" prevents collapsing from code as well as the UI, while "can't" just prevents collapsing from the UI.
3. When your outline view isn't a source list, you *might* want to show the disclosure triangle if the need to indicate visually the presence of children outweighs the inability to collapse the children. This might sound a bit more plausible if you consider the possibility of using a custom outline cell that doesn't look like a disclosure triangle.
_______________________________________________
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