Save the user input dropdown item permanently and set a call back function to run when dropdown option is selected

조회 수: 1 (최근 30일)
Hi,
I am Creating a drop down list (option1,option2,option3,option4) each when selected and press the run button, corresponding .m files are called and executed.
I want the user to add the dropdown option in app (eg: Option5) and run the corresponding .m file.
I am trying the code and is attached below. The problem is I can add dropdown item but how to assign the corresponding .m file to run when i press the run button.
Also, I want to store that dropdown option added newly and the corresponding .m file in the app permanently.
Please help me with this
I am trying this code:
function AddButtonPushed(app, event)
new = app.EditField2.Value;
if ~any(ismember(app.DropDown.Items,new))
app.DropDown.Items = [app.DropDown.Items new];
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by