フィルターのクリア

Update a gui table based on the input number given

4 ビュー (過去 30 日間)
Vasista Adupa
Vasista Adupa 2020 年 7 月 23 日
回答済み: Harsha Priya Daggubati 2020 年 7 月 27 日
Hi, I want to create a table of a certain size. Lets say rows are based on a number which I need to give input to the app. and the column is fixed. only one for now.
Is this possible. For now I created manually by writing 5 times the same code .. Please help me getting through this.
Please find the attachment of the mlapp file.
I am thinking to add a for loop for this section to automate it.
v = evalin("base",'original_proj_list'); % To import a variable from our workspace
v = ['Select';v(:,1)];
roll_nos = xlsread("./name_CGPA_2.xlsx");
roll_nos = ['Select';string(roll_nos(:,1))];
%for i = 1 : length(roll_nos)
app.StudentInfoDropDown.Items.i = roll_nos;
app.ProjectInfoDropDown.Items.i = v(:,1);
app.StudentInfoDropDown_2.Items = roll_nos;
app.ProjectInfoDropDown_2.Items = v(:,1);
app.StudentInfoDropDown_3.Items = roll_nos;
app.ProjectInfoDropDown_3.Items = v(:,1);
app.StudentInfoDropDown_4.Items = roll_nos;
app.ProjectInfoDropDown_4.Items = v(:,1);
app.StudentInfoDropDown_5.Items = roll_nos;
app.ProjectInfoDropDown_5.Items = v(:,1);
%end

回答 (1 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 7 月 27 日
Hi,
You can dynamically create a table when '#rows' are given as input in your app. This can be done by placing the code to create a table in the callback associated with the button that has to be clicked when '#rows' are entered.
For proper syntax to create a table:
This example might help you too!
I couldn't make sense of the code, where you are trying to populate every dropdown with same variables 'rollnos'. I can only help you, if you can elaborate on what you wanted to achieve.
Hope this helps!

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by