Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView - Programmatically creating Table Columns and populating



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:
http://lists.apple.com/mailman/options/cocoa-dev/idiotsavant2005% 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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTableView - Programmatically creating Table Columns and populating (From: Zef RosnBrick <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.