NSTextField with suggestions drop-down - cocoa

Instead of implementing my own, I am looking into reusing an existing custom NSTextField that has support for suggestions drop-down - Same as the one in the browser as you type you get a list of suggestions underneath.
Do you know any good ones?
Thank you!

They're called completions. You still use a regular text field but add this:
control:textView:completions:forPartialWordRange:indexOfSelectedItem
The biggest problem is you need to provide the list of words that can be autocompleted.

Related

How do i add single answer multiple choices question in SurveyMonkey?

I thought this should be super-easy but I guess SurveyMonkey didnt want to make this easy for their own reasons.
I tried adding multiple radio buttons answers but I am able to select them all and I cant see any settings which makes it required and as a single answer!
Can someone help me here?
You probably selected Checkboxes instead of Multiple Choice.
If you want to create a question where the respondent can only make one selection by default, you're looking for Multiple Choice:

Abbyy Flexicapture - Dropdown

I am trying to create a dropdown in AbyyFlexicapture.
The dropdown should be filled from database (i have external DLL ready to do the job) or with fixed values. The problem is I cant find the appropriate element for the job. All i found (the closest) was checkbox group, but I dont know how to use it (add items programaticaly). The documentation on this is very poor ...
Any help would be appreciated!
Figured it out. You just push data to textbox with query and it gets auto-converted to dropdown. But theres no way (at least known to me) how to set up default selection...
Look at the IField.Suggest() method.

NSTextfield AutoComplete like VisualStudio?

How can I set something for NSTextfields in xcode for autocompletion ?
I want to have suggestion when I type in textfields just like what we did in visualstudio's autocomplete and how we define it's autocomplete source.
For example if I have a textfield that user will type it's name I want to have suggestion from previously typed names or an array resource to give them some suggestion.
You could look into using token fields.

How to customize the Combobox dropdown list?

I have created a Combo box using HIComboBoxCreate(). When I have a long string in the dropdown list, it goes beyond the screen and the starting of the string is not visible. I want the string to be truncated with ellipsis in such a case. I have looked into the ComboBox attributes but couldn't find any that I can use to set this. I'm ready to write some extra code to do this, but I'm not sure if it possible. Can someone please help?
Try the HIViewSetTextTruncation function.

In what scenarios can i use an auto-suggest textbox?

I have a list of brand names for a particular product in the db. I can either display it on the screen using a drop down or and auto-suggest textbox.
I love the user experience of the auto-suggest textbox. But, is it right to use it here?
I would also want to know the best scenario to use it?
I think it depends on the number of items you need to display. If there are only a few, it gives hardly any advantage. But when there are many items, you can use it to filter out a lot of items, until there are only a few left. This makes finding the right item easier.
The Auto-Suggest textbox should be used when the user will be entering in a new piece of data MOST of the time... and the dropdown box should be used when the user will be entering repeated data MOST of the time.
Can you offer both? One of the products I worked on had a drop down list of brand names but allowed the user to type free text as well. The drop down list would narrow as you typed characters.
EDIT:
This was using Java: JComboBox.setEditable(true) with some additional fiddling if I remember right.

Resources