- Inherits from:
- NSObject
- Conforms to:
- NSObject
- (NSObject)
Declared in:
- AppKit/NSTableColumn.h
An NSTableColumn stores the display characteristics and attribute identifier for a column in an NSTableView. The NSTableColumn determines the width and width limits, resizability, and editability of its column in the NSTableView. It also stores two NSCell objects: the header cell, which is used to draw the column header, and the data cell, used to draw the values for each row. You can control the display of the column by setting the subclasses of NSCell used and by setting the font and other display characteristics for these NSCells. For example, you can use the default NSTextFieldCell for displaying string values or substitute an NSImageCell to display pictures.
See the NSTableView class specification for a general overview.
- Creating an NSTableColumn instance
- - initWithIdentifier:
- Setting the identifier
- - setIdentifier:
- - identifier
- Setting the NSTableView
- - setTableView:
- - tableView
- Controlling size
- - setWidth:
- - width
- - setMinWidth:
- - minWidth
- - setMaxWidth:
- - maxWidth
- - setResizable:
- - isResizable
- - sizeToFit
- Controlling editability
- - setEditable:
- - isEditable
- Setting component cells
- - setHeaderCell:
- - headerCell
- - setDataCell:
- - dataCell
- - dataCellForRow :
- (id)dataCell
See Also: - setDataCell:
- (id)dataCellForRow:(int)row
- (id)headerCell
See Also: - setHeaderCell:
- (id)identifier
See Also: - setIdentifier:
- (id)initWithIdentifier:anObject
See the NSTableView class specification for information on identifiers.
See Also: - setIdentifier:
- (BOOL)isEditable
YES
if
the user can edit cells associated with the receiver by double-clicking
the column in the NSTableView, NO
otherwise. You
can initiate editing programmatically regardless of this setting with
NSTableView's editColumn:row:withEvent:select: method.See Also: - setEditable:
- (BOOL)isResizable
YES
if
the user is allowed to resize the receiver in its NSTableView, NO
otherwise. You
can change the size programmatically regardless of this setting.See Also: - setWidth:, - setMinWidth:, - setMaxWidth:, - setResizable:
- (float)maxWidth
See Also: - minWidth, - width, - setMaxWidth:, - autoresizesAllColumnsToFit (NSTableView)
- (float)minWidth
See Also: - maxWidth, - width, - setMinWidth:, - autoresizesAllColumnsToFit (NSTableView)
- (void)setDataCell:(NSCell
*)aCell
See Also: - dataCell
- (void)setEditable:(BOOL)flag
YES
a double
click initiates editing; if flag is NO
it
merely sends the double action to the NSTableView's target. You
can initiate editing programmatically regardless of this setting
with NSTableView's editColumn:row:withEvent:select: method.See Also: - isEditable
- (void)setHeaderCell:(NSCell
*)aCell
nil
.See Also: - headerCell
- (void)setIdentifier:(id)anObject
See Also: - identifier
- (void)setMaxWidth:(float)maxWidth
See Also: - setMinWidth:, - setWidth:, - maxWidth, - autoresizesAllColumnsToFit (NSTableView)
- (void)setMinWidth:(float)minWidth
See Also: - setMaxWidth:, - setWidth:, - minWidth, - autoresizesAllColumnsToFit (NSTableView)
- (void)setResizable:(BOOL)flag
YES
the
user can resize the receiver; if flag is NO
the
user can't resize it. You can always set the size programmatically.See Also: - isResizable, - setWidth:, - setMinWidth:, - setMaxWidth:
- (void)setTableView:(NSTableView
*)aTableView
See Also: - tableView, - addTableColumn: (NSTableView)
- (void)setWidth:(float)newWidth
This method posts NSTableViewColumnDidResizeNotification on behalf of the receiver's NSTableView.
See Also: - width, - setMinWidth:, - setMaxWidth:, - autoresizesAllColumnsToFit (NSTableView)
- (void)sizeToFit
See Also: - width, - minWidth, - maxWidth, - autoresizesAllColumnsToFit (NSTableView)
- (NSTableView *)tableView
See Also: - setTableView:
- (float)width