I don't think you will be able to do what you want. There is no means to add an entry to a list box by typing. You can add an entry to a dropdown but not a listbox. Also you cannot replace an entry that exists. You would have to remove it then add your new entry.
My mistake. I want this functionality on a textfield also.