• 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: 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.

References: 
 >showing a checkbox and a pulldown-menu in a NSTableView (From: Philipp Seibel <email@hidden>)

  • Prev by Date: Re: Subclassing NSArray
  • Next by Date: Re: NSTextField and contextual menu (solved)
  • Previous by thread: Open firmware to BootX, how?
  • Next by thread: Re: showing a checkbox and a pulldown-menu in a NSTableView
  • Index(es):
    • Date
    • Thread