Re: Display Boolean Value in NSTableview
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.