correctly erasing items from a listbox
Show older comments
I am trying to erase some listings from a listBox. however, when I push the appropriate button I receive the following warning:
Warning: multi-selection listbox control requires that Value be an integer within String range
and the listBox control doesn't get rendered. Any ideas for a fix? here is the code of the button's callback :
function btnRemovePNU_FromUse_Callback(hObject, eventdata, handles)
% hObject handle to btnRemovePNU_FromUse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
PNUList = handles.liPNU_toUse;
indexedPNU = get(PNUList,'value');
PNUnames = get(PNUList,'String');
PNUnames(indexedPNU) = [];
set(PNUList,'String',PNUnames);
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks 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!