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

1 Ansicht (letzte 30 Tage)
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

Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by