Hiding NSButtonCell
Hiding NSButtonCell
- Subject: Hiding NSButtonCell
- From: Rainer Standke <email@hidden>
- Date: Mon, 5 Jul 2010 11:56:38 -0700
Hello,
I have an outline view with a column with an NSButtonCell in it. I want to make that button invisible and inactive for all outline rows. Here is my code for the ouline view's delegate:
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
if ( ! [item isLeaf] )
{
if ( [[tableColumn identifier] isEqualToString:@"toReconnect"] )
{
[cell setEnabled:NO];
[cell setTransparent:YES];
}
}
}
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?
Thanks,
Rainer
_______________________________________________
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