Questions tagged [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. An NSSearchField object wraps an NSSearchFieldCell object.

115 questions
10
votes
1 answer

Make NSSearchField use NSTokenFieldCell?

I'm trying to emulate the tokenized search feature of Mail.app and Finder.app on 10.7+ where there is what looks to be an NSSearchField with a search magnifying glass icon on the left and cancel (x) button on the right, but also includes tokens…
Andrew
  • 7,630
  • 3
  • 42
  • 51
8
votes
1 answer

Mail like search field with tokens (Mac OS X 10.7)

Is there a standard control for developers to get the search field behavior like in Mail (Mac OS X 10.7) to make advanced searches with tokens? In Mail the tokens are used to visualize a search for a mail which for example was sent by a person with…
brutella
  • 1,597
  • 13
  • 26
8
votes
2 answers

NSSearchField results menu

I've been searching for hours and still haven't found an answer to this. How can you get an NSSearchField to display a menu with results. I can use the recent searches menu to display results, but how do I make the menu display programmatically?…
edc1591
  • 10,146
  • 6
  • 40
  • 63
7
votes
1 answer

How to make NSSearchField send action upon autocompletion?

This question seems straightforward but I've tried everything I can think of, and Googled for hours. I have an NSSearchField that does autocomplete, basically copying Apple's SearchField sample code. I have turned off "Sends Whole Search String" in…
Jeremy
  • 2,801
  • 2
  • 30
  • 31
7
votes
3 answers

Contextual menu with search result for a NSSearchField

I would like to have a contextual menu that shows search results as text is entered in a search field. This is an image of the default mail app in OS X that does this. I know how to filter an array of strings according to the search request of the…
S. Young
  • 71
  • 4
5
votes
0 answers

How to get the vibrant effect for a NSTextField/NSSearchField like Safari's address bar in Big Sur

I have a Mac app with a search field in its toolbar (actually a NSTextField, but I tried NSSearchField as well). My problem is that the text field background on Big Sur is just plain white, which makes it hard to recognize. Safari's location bar on…
Mark
  • 6,647
  • 1
  • 45
  • 88
5
votes
1 answer

Call a function when a user presses enter in an NSSearchField?

I am surprised that I can't find the answer to this simple task. I just want the user to type in text, press enter, and have the application know what s/he typed. How would I do this?
Flafla2
  • 691
  • 2
  • 11
  • 21
5
votes
1 answer

How to prevent NSSearchField from overwriting entered strings using the first autocompletion list entry?

I am looking for a way to create an nssearchfield that behaves as follows: user types in text based on matches an autocompletion drop-down appears the text in the search field does not autocomplete to the first item in the list The point is,…
robject
  • 808
  • 1
  • 6
  • 12
5
votes
3 answers

Displaying progress indicator inside an NSSearchField

I am using a NSSearchField to run a query over the internet and display the results in a table view. Whilst the query is running I would like to display a progress indicator inside an NSSearchField? I think I have seen this done in another…
Olly
  • 3,409
  • 3
  • 24
  • 28
5
votes
2 answers

NSSearchField clear button does not respond to click

I am trying to clear field NSSearchField by clicking on the clear button on the right side. I am not able to click on it. Here is a screen recording of what's happening at my end: I used the following code found by RND: [[[self.SrcFiled cell]…
Nitin Gohel
  • 49,482
  • 17
  • 105
  • 144
5
votes
1 answer

Fine-tuning NSTextField auto completion

I'm using NSControlTextEditingDelegate to auto complete what's typed in a NSSearchField with custom suggestions I generate. complete: message is sent to field editor when text is changed. Now I'd like to fine-tune the behavior of auto-completion and…
Yoav
  • 5,962
  • 5
  • 39
  • 61
5
votes
2 answers

Binding NSArrayController to NSSearchField and viewing result in NSTableView

My app description, Add NSMutableArray with some items (say 1- 50) Add NSArrayController and add/bind that array to this arrayController Add NSTableView to my view and populate them using the concept of BINDINGS. Finally add a NSSearchField and…
Xander
  • 902
  • 2
  • 14
  • 33
4
votes
1 answer

How can I connect NSSearchField to my NSTableViewDataSource?

Most of the examples that I saw only connects NSSearchField to an NSArrayController. The problem is that I populated my NSTableView using NSTableViewDataSource protocol. I want my NSSearchField to search on the given NSTableView. Is there any way…
AdonisDee
  • 60
  • 2
  • 6
4
votes
1 answer

How to do searching in NSTableView with NSSearchField?

I have implemented a application in which I use NSTableview with the help of its data source and delegates I have not used NSArrayController nor I want to use it. My question is how can I bind NSSearchField with my NSTableView in this situation? I…
Hassan Malik
  • 559
  • 6
  • 20
4
votes
1 answer

How can I show NSSearchField menu programmatically?

I want to implement an NSSearchField showing search results similar to Safari's, but I cannot figure out how to show the menu programmatically. Any pointers would be greatly appreciated. Update: I tried doing this programmatically by calling…
jxpx777
  • 3,632
  • 4
  • 27
  • 43
1
2 3 4 5 6 7 8