how to add elements to listbox and retrieve(select) item from listbox
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
i am trying to add multiple items once per time to a blank listbox and allowing them to display on the listbox and retrieve it to string( to command window or text area) at the end.
i have read some documents about how to do it, but i just cant find the right property to do it, what i have now is app.PlayList.setSelectedItems, it only allows me to add one item to the listbox, and if i want to add more, it gonna cover the previous one.
i havent figure this out yet, so i dont know how to do the retrieve.
I am new to Matlab and app designer, so if you dont mind please be precise.
thank you very much.
0 Commenti
Risposte (1)
Cris LaPierre
il 14 Dic 2021
Modificato: Cris LaPierre
il 14 Dic 2021
You could use indexing to append a new value to the bottom of your listbox. Something like this should work (where newItem is a variable containing the text you want to add to your listbox.
app.PlayList.Items(end+1) = {newItem};
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!