correctly erasing items from a listbox
이전 댓글 표시
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);
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!