Why do I receive a warning when I repopulate my "listbox" uicontrol in MATLAB?
Show older comments
I create a "listbox" uicontrol which contains two items:
hListBox = uicontrol('Style','listbox','String',{'item 1' 'item 2'},'Position',[20 20 100 200]);
I select the listbox item 2, and then I repopulate the listbox with a single entry:
set(hListBox,'String',{'new item'});
When I repopulate my listbox, I receive a warning:
Warning: single-selection listbox control requires that Value be an integer within String range
Control will not be rendered until all of its parameter values are valid.
Accepted Answer
More Answers (0)
Categories
Find more on App Building in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!