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: Richard <email@hidden>
- Date: Mon, 16 Sep 2002 13:10:09 +1000
- Organization: Faraday R&D
>
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];
>
If you can actually get this to work for a pull-down menu in a cell
could you share the secret? I tried do this using the recommended procedure
and end up with an exception thrown inside Apple's code.
A question to this list produced no response whatosever,
so I concluded that Cocoa was too buggy/poorly documented
for me to bother with it.
_______________________________________________
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.