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.
Best Answer