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