Re: NSTableView and check boxes (for the hundredth time)
Re: NSTableView and check boxes (for the hundredth time)
- Subject: Re: NSTableView and check boxes (for the hundredth time)
- From: j o a r <email@hidden>
- Date: Thu, 3 Oct 2002 12:29:35 +0200
Try something like this instead. I set the button state in
willDisplayCell:
- (void) awakeFromNib
{
NSButtonCell *bCell = [[NSButtonCell alloc] init];
[bCell setButtonType: NSSwitchButton];
[bCell setImagePosition: NSImageOnly];
[enableColumn setDataCell: bCell];
[bCell release];
}
- (void) tableView:(NSTableView *) tableView willDisplayCell:(id) cell
forTableColumn:(NSTableColumn *) tableColumn row:(int) row
{
if (tableColumn == enableColumn)
{
[cell setState: NSOffState]; // Or NSOnState
}
}
As a side note you can see that I don't use the table column identifier
- I think it's much more slick to hook up the table columns in IB and
be able to refer to them directly.
j o a r
_______________________________________________
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.