• 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: Embedding a Check Box in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding a Check Box in an NSTableView


  • Subject: Re: Embedding a Check Box in an NSTableView
  • From: Hiro Fujimoto <email@hidden>
  • Date: Fri, 2 Apr 2004 13:42:33 +0900

Bruce,

Yes, its possible.
To put check box in the column ...

NSTableColumn* checkColumn = [aTable
tableColumnWithIdentifier:@"check"];
NSButtonCell* checkBoxCell = [NSButtonCell new];
[checkBoxCell setButtonType:NSSwitchButton];
[checkColumn setDataCell:checkBoxCell];

and set Boolean value ...

return [NSNumber numberWithBool:YESorNO]

as return value of

- (id) tableView:(NSTableView*)aTableView
objectValueForTableColumn:(NSTableColumn*)aTableColumn
row:(int)rowIndex;

Good luck.

--



On 2004/04/02, at 12:37, Bruce Truax wrote:

> I have a table view where one column is displaying a boolean value.
> Is it
> possible to put a check box in this column to display and allow
> changing the
> state of the boolean value?
>
> In another case I also need to display a boolean value but in this
> case it
> it mutually exclusive. In other words, for all of the items in the
> table,
> only one true value is allowed and the rest must be false. In this
> case it
> would be ideal if I could use an array of radio buttons. Is this
> possible?
>
> Bruce
>
> --
> _____
------------------------------------------------------------------------
---------
hiro FUJIMOTO - developer in Japan.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: Embedding a Check Box in an NSTableView
      • From: Stephane Sudre <email@hidden>
References: 
 >Embedding a Check Box in an NSTableView (From: Bruce Truax <email@hidden>)

  • Prev by Date: Embedding a Check Box in an NSTableView
  • Next by Date: Re: Embedding a Check Box in an NSTableView
  • Previous by thread: Embedding a Check Box in an NSTableView
  • Next by thread: Re: Embedding a Check Box in an NSTableView
  • Index(es):
    • Date
    • Thread