Clear Filters
Clear Filters

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

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!