Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSSearchFieldMBS class

Super class: NSTextFieldMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Controls MBS MacCocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: An NSSearchField object implements a text field control that is optimized for performing text-based searches.
// create searchfield
dim n as new NSSearchFieldMBS(0,0,100,20)

// set placeholder
dim x as NSTextFieldCellMBS = n.cell
x.placeholderString = "Test"
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.

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.

You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSTextFieldMBS class.

Feedback, Comments & Corrections

Search menu template constants

Constant Value Description
NSSearchFieldClearRecentsMenuItemTag 1002 Identifies the menu item for clearing the current set of recent string searches in the menu.
This item is hidden if there are no recent strings.
NSSearchFieldNoRecentsMenuItemTag 1003 Identifies the menu item that describes a lack of recent search strings (for example, "No recent searches").
This item is hidden if there have been recent searches.
NSSearchFieldRecentsMenuItemTag 1001 Identifies where recent search strings should appear in the "recents" menu group.
NSSearchFieldRecentsTitleMenuItemTag 1000 Identifies the menu item that is the title of the menu group for recent search strings.
This item is hidden if there are no recent strings.
You may use this tagged item for separator characters that also do not appear if there are no recent strings to display.

Super class NSTextFieldMBS

Super class NSControlMBS

Super class NSViewMBS

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

Sub classes:

Some properties using for this class:

Some examples which use this class:

The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin.

NSScrollViewMBS   -   NSSecureTextFieldMBS

MBS FileMaker Plugins