User Input to the Dropdown menu in appdesigner

6 Ansichten (letzte 30 Tage)
Harish M Y
Harish M Y am 19 Jul. 2021
Kommentiert: Harish M Y am 19 Jul. 2021
Hi,
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.new = app.EditField2.Value;
if ~any(ismember(app.DropDown.Items,app.new))
app.DropDown.Items = [app.DropDown.Items app.new];
end
%% Code to run the corresponding model
if app.DropDown.Value == app.new
RunModel5; %% name of .m file
end
I want the Item added to be stored permanentaly and also the RunModel5 into the database. Please help me with this
  1 Kommentar
Harish M Y
Harish M Y am 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by