UI Tables in a UI Figure

By default, a new figure is generated by MATLAB for to create a UI table (without any parent figure). 

Example 2:

Matlab




% MATLAB Code
tab = uitable;


 

However, this is not a UI figure component and thus, we cannot add tabular data to such a UI table. The solution for this problem is creating the UI table within a UI figure component. The same can be done by passing the uifigure name to the uitable function. 

Matlab




% MATLAB Code
fig = uifigure;
tab = uitable(fig);


In this case, we get a UI figure, which could be developed into an application. The UI table is created inside this UI figure.

 

As for adding tabular data to this kind of uitable, we have seen the same in previous section.

Control Table UI Component Appearance and Behavior in MATLAB

In this article, we shall discuss how to create UI tables in MATLAB and control their behaviors and appearance by manipulating some basic properties and visuals. UI tables in MATLAB are the graphical form of tabular data. The UI tables can be created using the uitable function.

Syntax

tab = uitable(…parameters…)

The uitable without any parameters generates an empty table. Different parameters could be passed to the same for data modification. We shall not discuss creating UI tables in depth as it is not in this article’s scope. 

Similar Reads

Creating a Basic UI Table

We can create a UI table by passing a prepared data to a uitable component....

UI Tables in a UI Figure

...

Column-Width of UI tables

By default, a new figure is generated by MATLAB for to create a UI table (without any parent figure)....

Fonts in UI tables

...

Colors in UI tables

...