Class

NSSearchField

A text field control that is optimized for performing text-based searches.

Declaration

@interface NSSearchField : NSTextField

Overview

NSSearchField provides a customized text field for entering search data, a search button, a cancel button, and a pop-up icon menu for listing recent search strings and custom search categories. An NSSearchField object wraps an NSSearchFieldCell object. Access to most search field attributes occurs through the cell, which provides a more comprehensive programmatic interface for manipulating the search field. You can use an NSSearchField object though to manipulate some aspects of the search field. For additional information about search fields and how to manipulate them, see the NSSearchFieldCell class.

Topics

Managing the Search

NSSearchFieldDelegate

A protocol that a search field delegate can use to determine when a search started or ended.

Managing Menu Templates

searchMenuTemplate

The menu object used to dynamically construct the search field’s pop-up icon menu.

NSSearchFieldClearRecentsMenuItemTag

Identifies the menu item for clearing the current set of recent string searches in the menu.

NSSearchFieldNoRecentsMenuItemTag

Identifies the menu item that describes a lack of recent search strings (for example, “No recent searches”).

NSSearchFieldRecentsMenuItemTag

Identifies where recent search strings should appear in the “recents” menu group.

NSSearchFieldRecentsTitleMenuItemTag

Identifies the menu item that is the title of the menu group for recent search strings.

Managing search modes

sendsSearchStringImmediately

A Boolean value indicating whether the cell calls its action method immediately when an appropriate action occurs.

sendsWholeSearchString

A Boolean value indicating whether the cell calls its search action method when the user clicks the search button (or presses Return) or after each keystroke.

Managing recent searches

recentSearches

The list of recent search strings for the control.

Managing recent search strings

maximumRecents

The maximum number of search strings that can appear in the search menu.

recentsAutosaveName

The autosave name under which the receiver automatically archives the list of recent search strings

Configuring the Search Field

Relationships

Inherits From