필터 지우기
필터 지우기

select more choices in listbox GUI

조회 수: 1 (최근 30일)
Fiboehh
Fiboehh 2011년 4월 21일
Hellow, first of all, i use GUIDE to make my gui. My main code generates a few images but i dont know on forehand how mutch! And all these images have to come in a listbox. Anyone knows how to do this? Than i want to save them all at once. Is that possible? And is it possible to select a few of them and then save them?
Farther i have two pushbuttons, one to open a select image in the listbox and one to save it seperate. Any suggestion how to do it? Many thx in advance

채택된 답변

Paulo Silva
Paulo Silva 2011년 4월 21일
The Min and Max properties control the selection mode: If Max-Min>1, then multiple selection is allowed. If Max-Min<=1, then only single selection is allowed.
In the callback of the list box do
list = get(hObject,'String');
To get a cell array of strings that correspond to the items selected
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 5월 1일
Not quite. To get a cell array of strings that correspond to the items selected,
allstrings = get(hObject,'String');
list = allstrings(get(hObject,'Value'));

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by