O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSTableView — Mac OS X 10.0

Synopsis

This subclass of NSView organizes information into rows and columns. The information displayed in the table comes from an object that serves as the table view’s data source object; data source objects must implement a minimum set of methods declared by the NSTableDataSource informal protocol. Instances of NSTableView are composite objects that manage NSTableColumn objects (one for each column in a table), and NSTableHeaderView objects (to draw the headers over the table columns).

image with no caption

@interface NSTableView : NSControl
                                  // Accessor Methods
   - (void)setRowHeight:(float)rowHeight;
   - (float)rowHeight;
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
   - (void)setHeaderView:(NSTableHeaderView *)headerView;
   - (NSTableHeaderView *)headerView;
   - (void)setCornerView:(NSView *)cornerView;
   - (NSView *)cornerView;
   - (void)setAllowsColumnReordering:(BOOL)flag;
   - (BOOL)allowsColumnReordering;
   - (void)setAllowsColumnResizing:(BOOL)flag;
   - (BOOL)allowsColumnResizing;
   - (void)setAutoresizesAllColumnsToFit:(BOOL)flag;
   - (BOOL)autoresizesAllColumnsToFit;
   - (void)setIntercellSpacing:(NSSize)aSize;
   - (NSSize)intercellSpacing;
   - (void)setBackgroundColor:(NSColor *)color;
   - (NSColor *)backgroundColor;
   - (void)setGridColor:(NSColor *)color;
   - (NSColor *)gridColor;
   - (void)setIndicatorImage:(NSImage *)anImage  
                                 inTableColumn

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required