How do I add and remove elements from a listbox that I have created using GUIDE within MATLAB 6.5.1 (R13SP1)?

2 vues (au cours des 30 derniers jours)
I would like to add and remove elements from a listbox that I have created using GUIDE.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 21 Jan 2010
Elements are added to and removed from a listbox by using the SET and GET functions on the "String" property of the listbox. Download the attached files for an example on how to add and remove elements from a listbox:
In this GUI, an initial list box is created with the elements "one", "two" and "three". You can then add an element to the end of the list through an edit box. You can also specify by index number which element you would like to remove from the list.
If there are any functions within the code that you are unfamiliar with, please consult the documentation. For example, for more information on the CELLSTR function, type the following at the MATLAB prompt:
help cellstr

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits


Version

R13SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by