(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSTextField 

Inherits From:	NSControl : NSView : NSResponder : NSObject 

Declared In:	appkit/NSTextField.h 

Setting User Access to Text 

- (BOOL)isEditable	Returns whether the NSTextField's text is editable. 
- (BOOL)isSelectable	Returns whether the NSTextField's text is selectable. 
- (void)setEditable:(BOOL)flag	Sets whether the NSTextField's text is editable. 
- (void)setSelectable:(BOOL)flag	Sets whether the NSTextField's text is selectable. 

Editing Text 

- (void)selectText:(id)sender	Selects all of the text if it's selectable or editable. 

Setting Tab Key Behavior 

- (id)nextText	Gets the object selected when the user presses Tab. 
- (id)previousText	Gets the object selected when the user presses Shift-Tab. 
- (void)setNextText:(id)anObject	Sets the object selected when the user presses Tab. 
- (void)setPreviousText:(id)anObject	Sets the object selected when the user presses  Shift-Tab. 

Assigning a Text Delegate 

- (void)setTextDelegate:(id)anObject	Sets the delegate for messages from the field editor to anObject.
- (id)textDelegate	Returns the delegate for messages from the field editor. 

Modifying Graphic Attributes 

- (NSColor *)backgroundColor	Returns the color of the background.
- (BOOL)drawsBackground	Returns whether the NSTextField draws its own background.
- (BOOL)isBezeled	Returns whether the NSTextField has a bezeled border. 
- (BOOL)isBordered	Returns whether the NSTextField has a plain border. 
- (void)setBackgroundColor:(NSColor *)aColor	Sets the color of the background to aColor. 
- (void)setBezeled:(BOOL)flag	Sets whether the NSTextField has a bezeled border. 
- (void)setBordered:(BOOL)flag	Sets whether the NSTextField has a plain border. 
- (void)setDrawsBackground:(BOOL)flag	Sets whether the NSTextField draws its own background color. 
- (void)setTextColor:(NSColor *)aColor	Sets the color of the NSTextField's text to aColor.
- (NSColor *)textColor	Returns the color of the NSTextField's text.

Target and Action 

- (SEL)errorAction	Returns the action method sent for an invalid value. 
- (void)setErrorAction:(SEL)aSelector	Sets the action method sent (aSelector) for an invalid value entered. 

Handling Events 

- (BOOL)acceptsFirstResponder	Return YES if text is editable or selectable. 
- (void)textDidBeginEditing:(NSNotification *)notification
	Invoked when there's a change in the text after the receiver gains first responder status.  Default behavior is pass to this message on to the text delegate.
- (void)textDidChange:(NSNotification *)notification	
	Invoked upon a key-down event or paste operation that  changes the receiver's contents.  Default behavior is to pass this message on to the text delegate.
- (void)textDidEndEditing:(NSNotification *)notification
	Invoked when text editing ends and then forwarded  to the text delegate.
- (BOOL)textShouldBeginEditing:(NSText *)textObject 
	Invoked to let the NSTextField respond to impending changes to its text and then forwarded to the text delegate.
- (BOOL)textShouldEndEditing:(NSText *)textObject
	Invoked to let the NSTextField respond to impending loss of first responder status and then forwarded  to the text delegate.