- Inherits from:
- NSActionCell : NSCell : NSObject
- Conforms to:
- NSCoding
- (NSCell)
- NSCopying (NSCell)
- NSObject (NSObject)
Declared in:
- AppKit/NSTextFieldCell.h
NSTextFieldCell adds to NSCell's text-display capabilities by allowing you to set the color of both the text and its background. You can also specify whether the cell draws its background at all. All of the methods declared by this class are also declared by NSTextField, which uses NSTextFieldCells to draw and edit text.
- Setting the text color
- - setTextColor:
- - textColor
- Controlling the background
- - setBackgroundColor:
- - backgroundColor
- - setDrawsBackground:
- - drawsBackground
- Changing the field editor
- - setUpFieldEditorAttributes:
- (NSColor *)backgroundColor
See Also: - drawsBackground, - backgroundColor (NSTextField), - setBackgroundColor:
- (BOOL)drawsBackground
YES
if
the receiver's cell draws its background color behind its text, NO
if
it draws no background.See Also: - backgroundColor, - drawsBackground (NSTextField), - setDrawsBackground:
- (void)setBackgroundColor:(NSColor
*)aColor
See Also: - setDrawsBackground:, - setBackgroundColor: (NSTextField), - backgroundColor
- (void)setDrawsBackground:(BOOL)flag
YES
,
then it does; if flag is NO
,
then it draws nothing behind its text.See Also: - setBackgroundColor:, - setDrawsBackground: (NSTextField), - drawsBackground
- (void)setTextColor:(NSColor
*)aColor
See Also: - setBackgroundColor:, - setTextColor: (NSTextField), - textColor
- (NSText *)setUpFieldEditorAttributes:(NSText
*)textObj
super
's
implementation, and return the textObj argument.
For information on field editors, see "The Field Editor" (page 1736) in
the NSWindow class description.- (NSColor *)textColor
See Also: - backgroundColor, - textColor (NSTextField), - setTextColor: