AutoComplete TextBox Multiple Entries Comma Separa

2020-07-25 10:50发布

Is there any way of making a TextBox widget that autocompletes, but allows you to autocomplete each time you have a separator, for example a ",".

Let's say I want to write a list of fruits in a textbox, for example:

"Apples, Pears"

...and my list of valid entries is let's say [ Apples, Pears, Oranges, Clementines ] so each time I type a comma it resets the autocompletion, so that for example "A" was autocompleted to "Apples", but then typing a comma and then typing "Pe" will auto-complete to "Pears".

Big ask I know, but just in case...

1条回答
三岁会撩人
2楼-- · 2020-07-25 11:09

I suggest to take a look at this Autocomplete Textbox from there you use Regular Expressions to split the input text with commas and separate them and just populate again the control to whatever the result was. Hope it helps!

查看更多
登录 后发表回答