How do I add and remove elements from a listbox that I have created using GUIDE within MATLAB 6.5.1 (R13SP1)?
2 views (last 30 days)
Show older comments
I would like to add and remove elements from a listbox that I have created using GUIDE.
Accepted Answer
MathWorks Support Team
on 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
0 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!