Thanks for your help, Graham, that now makes more sense. I am actually using 
'isLeaf' on item to determine if it's a parent or not...

Rainer

On Jul 5, 2010, at 17:11 , Graham Cox wrote:

> 
> On 06/07/2010, at 4:56 AM, Rainer Standke wrote:
> 
>> setEnabled works on single cells, and as expected: the outline row's button 
>> is grayed out. Oddly, setTransparent affects all cells in the column, i.e. 
>> the button appears in no row, not even the ones that have no children. 
>> 
>> That's confusingly inconsistent, to me. What should I do to make invisible 
>> only the checkboxes in the row that have a twirly triangle?
> 
> 
> There is only one cell, reused for each row in the column as needed.
> 
> Therefore you not only need to disable the cell/make it transparent, but set 
> the opposite state for all other rows, otherwise it just remains in the last 
> state you set.
> 
> If you just want to hide it for 'parent' items, this method can also refer to 
> the other delegate method - (BOOL)outlineView:(NSOutlineView *)outlineView 
> isGroupItem:(id)item. Presumably your controller/data model can determine 
> which items are parent items since the outline view is told this information 
> by you:
> 
> 
> - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell 
> forTableColumn:(NSTableColumn *)tableColumn item:(id)item
> {
>       if ( [[tableColumn identifier] isEqualToString:@"toReconnect"] )
>       {
>               [cell setEnabled:![self outlineView:outlineView 
> isGroupItem:item]];
>               [cell setTransparent:[self outlineView:outlineView 
> isGroupItem:item]];
>       }
> }
> 
> --Graham
> 
> 
> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to