I want to display a table in my app designer after clicking a button. Can anyone help me with it ?

31 vues (au cours des 30 derniers jours)
Have want to display a table it a definite place in my app designer . For example in the given ui ( look picture attached with it). I want to display students details in student tab. As user click on user tab a table containing student details should be shown in the space belo the tab(marked with blue boundries)

Réponses (1)

Kevin Holly
Kevin Holly le 28 Avr 2022
Modifié(e) : Kevin Holly le 28 Avr 2022
Attached are two different apps that show two different approaches.
In the LoadandPlotExcelData app, I created a uitable in App Designer by simply dragging the uitable component to the canvas and positioned it. Then I made it invisible by checking the "Visible" checkbox underneath the "INTERACTIVITY" heading within the property inspection on the right panel in App Designer after selecting the component on the canvas. I programmatically made it visible by adding the command below within a callback function.
app.UITable.Visible = 'on';
In the GenerateSubplotsFromMatrix app, I programmatically created an axes and then plotted within it with the commands below.
ax1 = axes(app.Panel.Children.Children(ceil(i/3)),"Position",[0.1300 0.7093 0.7750 0.2157]);
plot(ax1,a(:,i))
For your application, you could write the following to create a uitable within the Teacher tab that fills the whole tab.
uitable(app.TeacherTab,"Position",[0 0 1 1]) % [x starting point, y starting point, Width, Height] in normalized units

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by