FieldCompletionFunction

FieldCompletionFunction

is an option for InputField that specifies a function to apply to the input field's contents to generate a list of completions.

Details

  • The default value of FieldCompletionFunction->Automatic indicates that there will be no completion menu for the input field.
  • When a field completion function is specified, the front end will call the function with the current contents of the InputField. If the result of calling the function is a List, then the front end will display the elements of the list in a completion popup menu, which is typically positioned immediately below the input field.
  • If the completion function returns an empty list, no menu will be displayed.
  • The completion function will be called after every keystroke, even if ContinuousAction->False has been set.

Examples

open allclose all

Basic Examples  (2)

Create an input field that offers a fixed set of completions:

In[1]:=
Click for copyable input
Out[1]=

Use a completion function that modifies the existing input:

In[1]:=
Click for copyable input
Out[1]=

Applications  (2)

Possible Issues  (1)

See Also

ContinuousAction  PopupMenu

Introduced in 2017
(11.1)