• 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: NSTableView - Programmatically creating Table Columns and populating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView - Programmatically creating Table Columns and populating


  • Subject: Re: NSTableView - Programmatically creating Table Columns and populating
  • From: "I. Savant" <email@hidden>
  • Date: Fri, 28 Jul 2006 06:54:45 -0400

Zef:

  How about:

NSTableColumn * newColumn = [[NSTableColumn alloc] initWithIdentifier:@"newColumnIdentifier"];

  Then:

[myTable addTableColumn:newColumn];

You can also set the column's initial, min, and max sizes, its data cell, etc. This is all in the documentation for NSTableColumn. If you are using table data sources, just add the code to respond to @"newColumnIdentifier". If you are using Bindings, look up the NSKeyValueBindingCreation method, -bind:toObject:withKeyPath:options:.

--
I.S.


On Jul 28, 2006, at 12:37 AM, Zef RosnBrick wrote:

Is there any way to programmatically create every you need for a table column except for dragging the table column into a window in IB, setting the number of columns to zero, and making the connection? Basically, I want to create multiple columns for my table view, and populate them from an array or dictionary. Some sample code would be great.

Thanks,
Zef
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSTableView - Programmatically creating Table Columns and populating (From: Zef RosnBrick <email@hidden>)

  • Prev by Date: Re: Show/Hide columns in NSTableView?
  • Next by Date: Re: NSTableView - Programmatically creating Table Columns and populating
  • Previous by thread: NSTableView - Programmatically creating Table Columns and populating
  • Next by thread: Re: NSTableView - Programmatically creating Table Columns and populating
  • Index(es):
    • Date
    • Thread