Filter löschen
Filter löschen

Grid Layout and Tab Group

6 Ansichten (letzte 30 Tage)
Mirko Maurici
Mirko Maurici am 18 Apr. 2019
Bearbeitet: Alice am 14 Mai 2019
I recently upgraded to r2019a, and I'm wondering if anybody experienced the same issue with the new feature Grid Layout in app designer.
I'm trying to fit a tab group in a certain region
Cattura.PNG
but when I run the app this is what I get
Cattura2.PNG
The tab group won't keep the position.
Any solution?
thanks

Akzeptierte Antwort

Alice
Alice am 19 Apr. 2019
Bearbeitet: Alice am 14 Mai 2019
Unfortunately, this is a regression in R2019a.
The workaround is to temporarily place the tab group in a different cell, then call drawnow, then place it back to its real location.
Example (outside AppDesigner):
f = uifigure;
g = uigridlayout(f);
c = uibutton(g);
tg = uitabgroup(g);
% Workaround:
%
% set it temporarily in a different location
tg.Layout.Row = 2;
% call drawnow
drawnow;
% set it back to its real location
tg.Layout.Row = 1;
Example (in AppDesigner):
% 1. Drag a tab group in a cell, e.g. row 3, column 1
% 2. Create a startup function and place the workaround in it, e.g.
%
% set it temporarily in a different location
app.TabGroup.Layout.Row = 4;
% call drawnow
drawnow;
% set it back to its real location
app.TabGroup.Layout.Row = 3;
Note:
The temporarily location MUST be different from its actual location.
To make sure that is the case, you can set the temporary location to a cell 'outside' the grid, for example, if the grid is of size 5x5, set the temporary Row to 6.
Another way is to add 1 to the row (or column), then place it back.
Bug report:
Please see the corresponding bug report for the latest info on the releases / updates in which this will be fixed:

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by