NSTextField with a NSTableView completion list - suggestions for text field
NSTextField with a NSTableView completion list - suggestions for text field
- Subject: NSTextField with a NSTableView completion list - suggestions for text field
- From: Alex Kac <email@hidden>
- Date: Thu, 19 Mar 2015 17:20:27 -0600
I have a few places where I’d like to have essentially an NSTextField with an auto-complete - but its not a combo-box. The closest I can come up with what I’m looking for is the Apple Calendar location field where it brings up a search auto-complete. A few things are that it looks like a standard text field and you can type any text you want, but you can also select something from the completion list. The completion list is also an attributed string or a table cell that lets us customize the look just like it:
https://www.dropbox.com/s/w61ztjlwzv414l6/Screenshot 2015-03-19 15.47.05.png?dl=0
So what are my best options here? This also needs to work IN a Popover, so having a popover come under the text field doesn’t work either. I’ve looked at NSSearchField and this is not a search field. Its a suggestion box which is different both in its purpose and aesthetics.
I’m sure its just a simple “do this and this”. Maybe its just a text field with a NSTableView in my view that is hidden until its needed. That’s fine, but I want to make sure I’m doing it right. Thanks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden