Re: showing a checkbox and a pulldown-menu in a NSTableView
Re: showing a checkbox and a pulldown-menu in a NSTableView
- Subject: Re: showing a checkbox and a pulldown-menu in a NSTableView
- From: John Anderson <email@hidden>
- Date: Sun, 15 Sep 2002 08:56:42 -0700
In your awakeFromNib method, instantiate a NSButtonCell and set it up
to be a checkbox with the appropriate title. I also usually make it a
small control to save some horizontal space. Then set it as the default
cell for a table column, like such:
NSTableColumn *column = [myAttributesTable tableColumnWithIdentifier:
@"id_from_interface_builder"];
NSButtonCell *defaultRequiredCell =
[[[NSButtonCell alloc] init] autorelease];
[defaultRequiredCell setButtonType:NSSwitchButton];
[defaultRequiredCell setTitle:@""];
[defaultRequiredCell setControlSize:NSSmallControlSize];
[column setDataCell:defaultRequiredCell];
Good luck!
John Anderson
On Saturday, September 14, 2002, at 05:34 AM, Philipp Seibel wrote:
I'd like to show a checkbox in the first column of a NSTableView, but
i couldn't get it work.
Can anybody help me?
thx Phil
_______________________________________________
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.