User Input to the Dropdown menu in appdesigner

1 view (last 30 days)
I am developing an application where I need to run some .m files. So, I created a dropdown menu (with 4 options say for eg: a,b,c,d) which when selected and run opens a directory window to select the corresponding .m file to select and run.
If in case in fututre, if the user wants one more option (eg: e) to be added to the dropdown menu list, I have a provision to write the name for dropdown as e and add that to the dropdown menu and run the model.
But, when I close the app and run the app again, the newly added dropdown menu (e) is not there. I need to store that into the database permanetaly. Any suggestions for this ?
%% Code to add the new dropdown name to the dropdown list = app.EditField2.Value;
if ~any(ismember(app.DropDown.Items,
app.DropDown.Items = [app.DropDown.Items];
%% Code to run the corresponding model
if app.DropDown.Value ==
RunModel5; %% name of .m file
I want the Item added to be stored permanentaly and also the RunModel5 into the database. Please help me with this
  1 Comment
Harish M Y
Harish M Y on 19 Jul 2021
Hey one more thing, the RunModel5 is the .m file which is also selected byy the user for first time and the RunModel5 is to be stored afterwards.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by