Can you place ui-components in uigridlayout using Name-Value pair input?
uif = uifigure;
uig = uigridlayout(‘Parent’, uif, …
‘ColumnWidth’, repmat({‘1x’}, 1, 5), …
‘RowHeight’, repmat({‘1x’}, 1, 3));
uib = uibutton(‘Parent’, uig, …
‘Text’, ‘I want to be placed in one line’)
% Put this lines inside ‘uibutton’ initialisation:
uib.Layout.Column = 3;
uib.Layout.Row = 2;
I searched for something able to create an instance of GridLayoutOptions, but i can’t find anything.
An alternative would be to understand how matlab.ui.layout.LayoutOptions would accept inputs.uif = uifigure;
uig = uigridlayout(‘Parent’, uif, …
‘ColumnWidth’, repmat({‘1x’}, 1, 5), …
‘RowHeight’, repmat({‘1x’}, 1, 3));
uib = uibutton(‘Parent’, uig, …
‘Text’, ‘I want to be placed in one line’)
% Put this lines inside ‘uibutton’ initialisation:
uib.Layout.Column = 3;
uib.Layout.Row = 2;
I searched for something able to create an instance of GridLayoutOptions, but i can’t find anything.
An alternative would be to understand how matlab.ui.layout.LayoutOptions would accept inputs. uif = uifigure;
uig = uigridlayout(‘Parent’, uif, …
‘ColumnWidth’, repmat({‘1x’}, 1, 5), …
‘RowHeight’, repmat({‘1x’}, 1, 3));
uib = uibutton(‘Parent’, uig, …
‘Text’, ‘I want to be placed in one line’)
% Put this lines inside ‘uibutton’ initialisation:
uib.Layout.Column = 3;
uib.Layout.Row = 2;
I searched for something able to create an instance of GridLayoutOptions, but i can’t find anything.
An alternative would be to understand how matlab.ui.layout.LayoutOptions would accept inputs. uigridlayout MATLAB Answers — New Questions