f = uifigure(
'Name'
,
'Grid Layout Example'
);
g = uigridlayout(f,[3 3]);
t1 = uitextarea(g,
'Value'
,
'Text 1'
);
t2 = uitextarea(g,
'Value'
,
'Text 2'
);
t3 = uitextarea(g,
'Value'
,
'Text 3'
);
b1 = uibutton(g,
'Text'
,
'Button 1'
);
b2 = uibutton(g,
'Text'
,
'Button 2'
);
b3 = uibutton(g,
'Text'
,
'Button 3'
);
b4 = uibutton(g,
'Text'
,
'Button 4'
);
b5 = uibutton(g,
'Text'
,
'Button 5'
);
g.Layout.Row = [1 1 1 2 2 2 3 3 3];
g.Layout.Column = [1 2 3 1 2 3 1 2 3];
t1.Layout.RowSpan = 2;
t2.Layout.ColumnSpan = 2;
b3.Layout.RowSpan = 2;
b4.Layout.ColumnSpan = 2;