Hi All,
I want to place a checkbox on each NSTableView column header, when user click on it, the checkbox can be set to checked/unchecked state accordingly. I successfully put checkbox on NSTableView column header by using following code, I can see the checkbox there, but don't know how to change its value to on/off. My code snippet is as below: // Create CheckBox on Column Header NSButtonCell *cell = [[ NSButtonCell alloc] init]; [cell setTitle:@"Checkbox"]; [cell setButtonType:NSSwitchButton]; [cell setBordered:YES]; [cell setImagePosition:NSImageLeft]; [aColumn setHeaderCell:cell]; [cell release]; By default checkbox is off state. I tried to use [cell setIntValue:NSOnState] before [cell release] to set the checkbox to on state, but failed. Looks like [NSButtonCell SetIntValue] is not the right way to change checkbox state. Any help be deeply appreciated. Echo _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
