Re: IB: TableColumn and NSButtonCell
Re: IB: TableColumn and NSButtonCell
- Subject: Re: IB: TableColumn and NSButtonCell
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 29 Oct 2003 18:15:48 +0100
By adding some code in your Data source.
to center the checkbox:
NSTableColumn *tColumn;
id tPrototypeCell;
tColumn=[IBarray_ tableColumnWithIdentifier:@"MyColumnIdentifier"];
tPrototypeCell=[tColumn dataCell];
[tPrototypeCell setImagePosition:NSImageOnly];
to handle the click on the checkbox:
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)object
forTableColumn:(NSTableColumn *)inColumn row:(int)inRow
{
if ([[inColumn identifier] isEqualToString:@"MyColumnIdentifier"])
{
if ([object boolValue] == YES)
{
}
else
{
}
}
}
Le mercredi, 29 oct 2003, ` 17:24 Europe/Paris, David Dauer a icrit :
Hi,
Since IB 2.4 (came with Xcode) i can drag into my TableColumn some
predefined cells. So i dragged a NSButtonCell (check-box) into my
table and
now i'm wondering why I can not center the check boxes and how i can
set an
action when the user clicked a checkbox.
Thanks
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.
_______________________________________________
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.