User Input to the Dropdown menu in appdesigner

조회 수: 1 (최근 30일)
Harish M Y
Harish M Y 2021년 7월 19일
댓글: Harish M Y 2021년 7월 19일
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
Harish M Y
Harish M Y 2021년 7월 19일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by