• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: showing a checkbox and a pulldown-menu in a NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Toplevel Objects in NIB files
  • Next by Date: Re: Text file encryption
  • Previous by thread: Re: showing a checkbox and a pulldown-menu in a NSTableView
  • Next by thread: Object Copying Question
  • Index(es):
    • Date
    • Thread