How to get default values in pop up menu GUI
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi! I have read parameteres from .txt file to pop up menu with code:
set(handles.popupmenu1,'String',namepar('parametres.txt'));
Where namepar is function:
function out=namepar(nazivfile)
fid=fopen(nazivfile);
cac=textscan(fid,'%s','Delimiter','#');
fclose(fid);
cac=cac{1};
out=cac;
end
So after I ran my GUI I have listed parameters in my popupmenu1. Can I make that is always chosen first parameter, if I don't choose otherwise in my pop up menu when I start my program?
댓글 수: 0
답변 (1개)
Jan
2015년 3월 21일
Do I understand correctly, that you want to set the 'Value'?
set(handles.popupmenu1, 'String', namepar('parametres.txt'), ...
'Value', 1);
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!