How can I implement incremental search on a listbox?

前端 未结 4 687
-上瘾入骨i
-上瘾入骨i 2021-01-19 00:19

I want to implement incremental search on a list of key-value pairs, bound to a Listbox.

If I had three values (AAB, AAC, AAD), then a user should be able to select

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 00:48

    Maybe you could add an event for TextChanged on the control where the user is typing is search (i'm guessing a TextBox). In the event, you could loop through all items to search the one that is the most corresponding to the words typed by the user.

提交回复
热议问题