Inherits From:
NSTextFieldCell : NSActionCell : NSCell : NSObject
Conforms To:
NSCoding (NSCell)
NSCopying (NSCell)
NSObject (NSObject)
Declared In:
AppKit/NSTableHeaderCell.h
Subclasses of NSTableHeaderCell can override drawInteriorWithFrame:inView:
, drawWithFrame:inView:
, and highlight:withFrame:inView:
to change the way headers appear. See the NSCell class specification, and the description below, for information on these methods.
drawInteriorWithFrame:
(NSRect)cellFrame inView:
(NSView *)controlView
Draws the receiver's interior, as described for this same method in the NSCell class specification. NSTableHeaderCell's implementation overrides NSTextFieldCell's to draw the receiver's image if it has one, instead of its string value. If the receiver has no image, it simply draws its string value. This allows column headers to be labeled with images rather than text.
To make an NSTableHeaderCell display an image, use NSCell's setImage:
method, which changes the receiver's cell type to NSImageCellType and stores the image provided. To restore it to displaying a text label, supply a new title using setStringValue:
, which removes the image and reverts the receiver's cell type to NSTextCellType.