Applying a Search Filter to a Listbox

Questo progetto contiene una lista chiamata listbox1, una casella di testo chiamata FilterTextbox e un pulsante che esegue una query e aggiorna il contenuto della lista.

This project contains a list called listbox1, a text box called FilterTextbox and a button that queries an internal database and updates the contents of the listbox. The list has as a model an internal database on which random strings are inserted by pressing the button “Generate random Strings” using a runtime script. On the query property listbox1, there is a string formatter, with a placeholder, dynamically linked to the text box. When text is entered, it is applied as a search filter to the listbox’s model and the results are displayed in the listbox.

Sulla proprietà query della lista, è presente uno string formatter formato da un unico segnaposto, collegato dinamicamente alla casella di testo. Il contenuto di quest’ultima viene usato come filtro di ricerca sul modello della listbox e i risultati vengono riportati nella lista.

Scarica il progetto di esempio da qui.