Hi Khalil Khalil,
It is my understanding that you want to show the grid lines of the “uigridlayout”. To achieve this, you can use “uipanel” inside “uigridlayout” in the “startupFcn” function of the application. Here is a sample code for the same:
function startupFcn(app)
% Create a UIGridLayout with 2 rows and 2 columns
gridLayout = uigridlayout(app.UIFigure, [2, 2]);
% Create the first UIPanel
panel1 = uipanel(gridLayout);
panel1.Layout.Row = 1;
panel1.Layout.Column = 1;
% Set other properties of panel1 as desired
% Create the second UIPanel
panel2 = uipanel(gridLayout);
panel2.Layout.Row = 1;
panel2.Layout.Column = 2;
% Set other properties of panel2 as desired
% Create the third UIPanel
panel3 = uipanel(gridLayout);
panel3.Layout.Row = 2;
panel3.Layout.Column = 1;
% Set other properties of panel3 as desired
% Create the fourth UIPanel
panel4 = uipanel(gridLayout);
panel4.Layout.Row = 2;
panel4.Layout.Column = 2;
% Set other properties of panel4 as desired
end
You can refer to the following documentation to know more about the functions used:
- uigridlayout: https://www.mathworks.com/help/matlab/ref/uigridlayout.html
- uipanel: https://www.mathworks.com/help/matlab/ref/uipanel.html
Best Regards,
Abhishek Chakram