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

조회 수: 30 (최근 30일)
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)

답변 (1개)

Kevin Holly
Kevin Holly 2022년 4월 28일
편집: Kevin Holly 2022년 4월 28일
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

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by