Classes

NSActionCell
NSAlert
NSApplication
NSArrayController
NSBezierPath
NSBitmapImageRep
NSBox
NSBrowser
NSBrowserCell
NSButton
NSButtonCell
NSCachedImageRep
NSCell
NSClipView
NSCollectionView
NSCollectionViewItem
NSColor
NSColorList
NSColorPanel
NSColorPicker
NSColorWell
NSComboBox
NSComboBoxCell
NSControl
NSController
NSCursor
NSCustomImageRep
NSDataLink
NSDataLinkManager
NSDataLinkPanel
NSDatePicker
NSDatePickerCell
NSDocument
NSDocumentController
NSDrawer
NSDrawerDelegate
NSEPSImageRep
NSEvent
NSFont
NSFontDescriptor
NSFontManager
NSFontPanel
NSForm
NSFormCell
NSGraphicsContext
NSHelpManager
NSHelpPanel
NSImage
NSImageCell
NSImageRep
NSImageView
NSInputServer
NSMatrix
NSMenu
NSMenuItem
NSMenuItemCell
NSMenuView
NSMovie
NSMovieView
NSMutableParagraphStyle
NSNib
NSObjectController
NSOpenGLContext
NSOpenGLPixelFormat
NSOpenGLView
NSOpenPanel
NSOutlineView
NSPageLayout
NSPanel
NSParagraphStyle
NSPasteboard
NSPasteboardItem
NSPopUpButton
NSPopUpButtonCell
NSPredicateEditor
NSPredicateEditorRowTemplate
NSPrintInfo
NSPrintOperation
NSPrintPanel
NSPrinter
NSProgressIndicator
NSResponder
NSRuleEditor
NSRulerMarker
NSSavePanel
NSScreen
NSScrollView
NSScroller
NSSecureTextField
NSSecureTextFieldCell
NSSelection
NSSharingService
NSSharingServicePicker
NSSlider
NSSliderCell
NSSound
NSSpeechSynthesizer
NSSpellChecker
NSSplitView
NSStepper
NSStepperCell
NSTabView
NSTabViewItem
NSTableColumn
NSTableHeaderCell
NSTableHeaderView
NSTableView
NSText
NSTextAttachment
NSTextAttachmentCell
NSTextContainer
NSTextField
NSTextFieldCell
NSTextStorage
NSTextTab
NSTextView
NSTokenField
NSTokenFieldCell
NSUserDefaultsController
NSView
NSWindow
NSWindowController
NSWorkspace

Protocols

<GSImageDelegateProtocol>
<NSAlertDelegate>
<NSApplicationDelegate>
<NSBrowserDelegate>
<NSCollectionViewDataSource>
<NSCollectionViewDelegate>
<NSCollectionViewElement>
<NSCollectionViewPrefetching>
<NSComboBoxCellDataSource>
<NSComboBoxDataSource>
<NSComboBoxDelegate>
<NSControlTextEditingDelegate>
<NSInputServerMouseTracker>
<NSInputServiceProvider>
<NSMatrixDelegate>
<NSMenuDelegate>
<NSMenuItem>
<NSMenuValidation>
<NSMenuView>
<NSOpenSavePanelDelegate>
<NSOutlineViewDataSource>
<NSOutlineViewDelegate>
<NSPasteboardItemDataProvider>
<NSPasteboardReading>
<NSPasteboardWriting>
<NSPrintPanelAccessorizing>
<NSRuleEditorDelegate>
<NSSharingServiceDelegate>
<NSSharingServicePickerDelegate>
<NSSpeechSynthesizerDelegate>
<NSSplitViewDelegate>
<NSTabViewDelegate>
<NSTableViewDataSource>
<NSTableViewDelegate>
<NSTextAttachmentCell>
<NSTextFieldDelegate>
<NSTextViewDelegate>
<NSWindowDelegate>
(NSAlertDelegate)
(NSApplicationDelegate)
(NSBrowserDelegate)
(NSComboBoxCellDataSource)
(NSControlDelegate)
(NSControlTextEditingDelegate)
(NSDataLinkManagerDelegate)
(NSDataPickerCellDelegate)
(NSEditor)
(NSEditorRegistration)
(NSFontManagerDelegate)
(NSFontPanelValidation)
(NSMenuActionResponder)
(NSMenuDelegate)
(NSOpenSavePanelDelegate)
(NSPasteboardItemDataProvider)
(NSPasteboardOwner)
(NSPasteboardReading)
(NSPasteboardWriting)
(NSPlaceholder)
(NSSavePanelDelegate)
(NSServicesRequests)
(NSSoundDelegate)
(NSSpeechSynthesizerDelegate)
(NSSplitViewDelegate)
(NSTableDataSource)
(NSTableViewDelegate)
(NSTextDelegate)
(NSTextStorageDelegate)
(NSTextViewDelegate)
(NSWindowDelegate)
(NSWindowDelegateAdditions)

Constants

Functions

Macros

Types

Variables

Up

NSTextField

Authors

Scott Christley (scottc@net-community.com)
Felipe A. Rodriguez (far@ix.netcom.com)
Nicola Pero (n.pero@mi.flashnet.it)

Date: Generated at 2025-07-12 14:18:56 +0000

Text field control class for text entry

Copyright: (C) 1996 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSTextField class
  2. Software documentation for the NSTextFieldDelegate protocol

Software documentation for the NSTextField class

NSTextField : NSControl

Declared in:
AppKit/NSTextField.h
Availability: OpenStep

Description forthcoming.

Instance Variables

Method summary


acceptsFirstResponder 

- (BOOL) acceptsFirstResponder;
Availability: OpenStep

Returns whether the NSTextField accepts to be the first responder. This method returns YES if the NSTextField is selectable and if there is no NSText object

See Also: -becomeFirstResponder -isSelectable [NSView -acceptsFirstResponder]


allowsEditingTextAttributes 

- (BOOL) allowsEditingTextAttributes;
Availability: MacOS-X 10.0.0

Description forthcoming.

backgroundColor 

- (NSColor*) backgroundColor;
Availability: OpenStep

Returns the color used to draw the background.

See Also: -setBackgroundColor: setDrawsBackground: -drawsBackground [NSTextFieldCell -backgroundColor]


bezelStyle 

- (NSTextFieldBezelStyle) bezelStyle;
Availability: MacOS-X 10.2.0

Description forthcoming.

delegate 

- (id<NSTextFieldDelegate>) delegate;
Availability: OpenStep

Returns the delegate object.

See Also: -setDelegate:


drawsBackground 

- (BOOL) drawsBackground;
Availability: OpenStep

Returns whether the NSTextField draws the background. By default NO.

See Also: -setDrawsBackground: [NSTextFieldCell -drawsBackground]


errorAction 

- (SEL) errorAction;
Availability: OpenStep

Description forthcoming.

importsGraphics 

- (BOOL) importsGraphics;
Availability: MacOS-X 10.0.0

Description forthcoming.

isBezeled 

- (BOOL) isBezeled;
Availability: OpenStep

Returns whether the NSTextField's cell has bezeled border.

See Also: -setBezeled: [NSTextFieldCell -isBezeled]


isBordered 

- (BOOL) isBordered;
Availability: OpenStep

Returns whether the NSTextField's cell has border.

See Also: -setBordered: [NSTextFieldCell -isBordered]


isEditable 

- (BOOL) isEditable;
Availability: OpenStep

Returns whether the NSTextField is editable. By default a NSTextField is not editable.

See Also: -setEditable: [NSCell -isEditable]


isSelectable 

- (BOOL) isSelectable;
Availability: OpenStep

Returns whether the NSTextField is selectable.

See Also: -setSelectable: [NSCell -isSelectable]


nextText 

- (id) nextText;
Availability: OpenStep

Returns the object selected when the user presses the TAB key.

See Also: -setNextText: [NSView -nextKeyView]


placeholderAttributedString 

- (NSAttributedString*) placeholderAttributedString;
Availability: OpenStep

Description forthcoming.

placeholderString 

- (NSString*) placeholderString;
Availability: OpenStep

Description forthcoming.

previousText 

- (id) previousText;
Availability: OpenStep

Returns the object selected when the user presses the Shift-TAB key.

See Also: -setPreviousText: [NSView -previousKeyView]


selectText: 

- (void) selectText: (id)sender;
Availability: OpenStep

Selects all the text of the NSTextField if it's selectable.


setAllowsEditingTextAttributes: 

- (void) setAllowsEditingTextAttributes: (BOOL)flag;
Availability: MacOS-X 10.0.0

Description forthcoming.

setBackgroundColor: 

- (void) setBackgroundColor: (NSColor*)aColor;
Availability: OpenStep


setBezelStyle: 

- (void) setBezelStyle: (NSTextFieldBezelStyle)style;
Availability: MacOS-X 10.2.0

Description forthcoming.

setBezeled: 

- (void) setBezeled: (BOOL)flag;
Availability: OpenStep

Sets whether the NSTextField's cell has bezeled border.

See Also: -isBezeled [NSTextFieldCell -setBezeled:]


setBordered: 

- (void) setBordered: (BOOL)flag;
Availability: OpenStep

Sets whether the NSTextField's cell has border.

See Also: -isBordered [NSTextFieldCell -setBordered:]


setDelegate: 

- (void) setDelegate: (id<NSTextFieldDelegate>)anObject;
Availability: OpenStep

Sets the delegate to anObject.

See Also: -delegate


setDrawsBackground: 

- (void) setDrawsBackground: (BOOL)flag;
Availability: OpenStep

Sets whether the NSTextField draws the background. By default NO.

See Also: -drawsBackground [NSTextFieldCell -setDrawsBackground:]


setEditable: 

- (void) setEditable: (BOOL)flag;
Availability: OpenStep

Sets whether the NSTextField's cell and the NSText object is editable. By default a NSTextField is not editable.

See Also: -isEditable [NSCell -setEditable:] [NSText -setEditable:]


setErrorAction: 

- (void) setErrorAction: (SEL)aSelector;
Availability: OpenStep

Description forthcoming.

setImportsGraphics: 

- (void) setImportsGraphics: (BOOL)flag;
Availability: MacOS-X 10.0.0

Description forthcoming.

setNextText: 

- (void) setNextText: (id)anObject;
Availability: OpenStep

Sets the object selected when the user presses the TAB key to anObject.

See Also: -nextText [NSView -setNextKeyView:]


setPlaceholderAttributedString: 

- (void) setPlaceholderAttributedString: (NSAttributedString*)string;
Availability: OpenStep

Description forthcoming.

setPlaceholderString: 

- (void) setPlaceholderString: (NSString*)string;
Availability: OpenStep

Description forthcoming.

setPreviousText: 

- (void) setPreviousText: (id)anObject;
Availability: OpenStep

Sets the object selected when the user presses the shift-TAB key to anObject.

See Also: -previousText [NSView -setPreviousKeyView:]


setSelectable: 

- (void) setSelectable: (BOOL)flag;
Availability: OpenStep

Sets whether the NSTextField's cell and the NSText object is selectable.

See Also: -isSelectable [NSTextFieldCell -setSelectable:] [NSText -setSelectable:]


setTextColor: 

- (void) setTextColor: (NSColor*)aColor;
Availability: OpenStep

Sets the color with which the text will be draw to aColor.

See Also: -textColor [NSTextFieldCell -setTextColor:]


setTitleWithMnemonic: 

- (void) setTitleWithMnemonic: (NSString*)aString;
Availability: MacOS-X 10.0.0

Description forthcoming.

textColor 

- (NSColor*) textColor;
Availability: OpenStep

Returns the colour used to draw the text.

See Also: -setTextColor: [NSTextFieldCell -textColor]


textDidBeginEditing: 

- (void) textDidBeginEditing: (NSNotification*)aNotification;
Availability: OpenStep

Description forthcoming.

textDidChange: 

- (void) textDidChange: (NSNotification*)aNotification;
Availability: OpenStep

Description forthcoming.

textDidEndEditing: 

- (void) textDidEndEditing: (NSNotification*)aNotification;
Availability: OpenStep

Description forthcoming.

textShouldBeginEditing: 

- (BOOL) textShouldBeginEditing: (NSText*)textObject;
Availability: OpenStep

Description forthcoming.

textShouldEndEditing: 

- (BOOL) textShouldEndEditing: (NSText*)textObject;
Availability: OpenStep

Description forthcoming.



Instance Variables for NSTextField Class

_delegate

@protected id _delegate;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_error_action

@protected SEL _error_action;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_text_object

@protected NSText* _text_object;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.




Software documentation for the NSTextFieldDelegate protocol

NSTextFieldDelegate

Declared in:
AppKit/NSTextField.h
Conforms to:
NSControlTextEditingDelegate
Availability: OpenStep

Description forthcoming.

Up