• 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
Re: Display Boolean Value in NSTableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Boolean Value in NSTableview


  • Subject: Re: Display Boolean Value in NSTableview
  • From: David Martin <email@hidden>
  • Date: Sat, 20 Apr 2002 17:34:47 +0200

On Saturday, April 20, 2002, at 05:45 , arun wrote:

I populate a NSTableView with data and need to show a boolean column value as tick mark. I could not find any information on how to do this. Is it not possible to do that. Also i need to edit that column.....

You'll have to add this kind of code in your awakeFromNib:

- (void)awakeFromNib
{
NSTableColumn *checkedColumn;
NSButtonCell *checkedButton;

// Creates a new column
checkedColumn = [aTableView tableColumnWithIdentifier:@"checked"];

// Populates the column with a NSSwitchButton
checkedButton = [NSButtonCell new];
[checkedButton setButtonType:NSSwitchButton];
[checkedButton setTitle:@""];
[checkedColumn setDataCell:checkedButton];
}

David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Display Boolean Value in NSTableview (From: arun <email@hidden>)

  • Prev by Date: Display Boolean Value in NSTableview
  • Next by Date: Simple Exception Handler - Revelation part Deux
  • Previous by thread: Display Boolean Value in NSTableview
  • Next by thread: Simple Exception Handler - Revelation part Deux
  • Index(es):
    • Date
    • Thread