Select checkbox in NSTableView
Select checkbox in NSTableView
- Subject: Select checkbox in NSTableView
- From: Richard Salvatierra <email@hidden>
- Date: Fri, 11 Nov 2005 16:41:22 -0500
I have an NSTableView of 4 columns. The first of which is a checkbox.
id checkboxCell = [[NSButtonCell alloc] initTextCell: @""];
[checkboxCell setButtonType: NSSwitchButton];
[[myTableView tableColumnWithIdentifier: @"checkbox"] setDataCell:
checkboxCell];
I want to add a button that checks all of the checkboxes for each
row. I tried:
int theIndex;
int rowCount = [clientList numberOfRows];
for(theIndex=0; theIndex < rowCount; theIndex++){
NSButtonCell *aCell = [clientList
tableColumnWithIdentifier:@"checkbox"] dataCellForRow:theIndex];
[aCell setState:NSOnState];
NSLog(@"%@", [aCell state]);
}
The NSLog print out of each aCell is the same object. Is this the
prototype of the tableColumn. How do I get each columns checkbox to
set the state?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden