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

3 views (last 30 days)
Robert  Robert
Robert Robert on 28 Apr 2022
Edited: Kevin Holly on 28 Apr 2022
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)

Answers (1)

Kevin Holly
Kevin Holly on 28 Apr 2022
Edited: Kevin Holly on 28 Apr 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]);
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




Community Treasure Hunt

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

Start Hunting!

Translated by