Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 application before.

Is there an open source component that I could use to accomplish this?

How would I go about doing this? What is the best way? What are the pitfalls?

like image 794
Olly Avatar asked Nov 15 '22 08:11

Olly


1 Answers

The easiest way is to put the progress indicator above (atop) the search field and leave them as separate views. It used to be that view z-ordering would give unpredictable results and weren't encouraged. That's not been true for several OS X versions, now, so if it looks good and behaves as expected, I say go for it.

The harder way would be to subclass NSSearchField and muck around according to the goodies found in the Control and Cell Programming Topics for Cocoa guide.

like image 56
Joshua Nozzi Avatar answered Dec 26 '22 13:12

Joshua Nozzi