• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Hiding NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Hiding NSButtonCell
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: [iPhone] Detecting FaceTime capability
  • Next by Date: UITableView.layer renderInContext: after setContentOffset ?
  • Previous by thread: Re: [iPhone] Detecting FaceTime capability
  • Next by thread: Re: Hiding NSButtonCell
  • Index(es):
    • Date
    • Thread