Class

NSSearchField

An NSSearchField object implements a text field control that is optimized for performing text-based searches. The control 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.

Overview

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.

Symbols

Managing menu templates

var searchMenuTemplate: NSMenu?

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

Managing search modes

var sendsSearchStringImmediately: Bool

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

var sendsWholeSearchString: Bool

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

var recentSearches: [String]

The list of recent search strings for the control.

Managing recent search strings

var maximumRecents: Int

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

var recentsAutosaveName: String?

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

Relationships

Inherits From

Conforms To