GUI Building Help - Layered Options

조회 수: 1 (최근 30일)
Adam Glick
Adam Glick 2015년 10월 8일
답변: TastyPastry 2015년 10월 8일
I am trying to build a GUI for a code I've already written. I am hoping to have a drop box that lets the user choose two options and based on the option they choose I want to have a unique "next step" pop up. I.E. if they choose the option that requires them to enter a scalar number I want a text box to appear for them to enter the number, but if they choose the option that requires them to enter a vector, I want a push button to appear that allows them to load an excel file containing the vector. How can I accomplish this? Thank you.

답변 (1개)

TastyPastry
TastyPastry 2015년 10월 8일
You'll need to edit your callback function for that popupmenu.
function popupCallback(hObject,eventdata,handles)
ind = get(handles.popup,'value');
switch ind
case 1
case 2
%etc...
end
Under case 1 and case 2 you'd run their respective functions.

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by