Auto completion of a text field

Colin Holgate coiin at verizon.net
Sat Apr 6 15:28:06 EDT 2013


I have done auto complete things in the past, and the way I did it was to have a second field underneath the first one. The underneath field shows the best match for the text that is in the field that the user is typing into. When they press return or enter, you don't use the text in the field they typed into, you use the text in the underneath field.

For my particular case I also chose to make the underneath field be a gray color. That was effective, and less confusing than having it be black.

Now, you could argue that someone might use the arrow keys to move towards the end of the text that they think is now in the field. You could handle that by transferring a letter from the underneath field into the top field, as the arrow key is pressed. Even then, that doesn't take care of a mouse click into a later character, but that took could probably be handled somehow.




More information about the use-livecode mailing list