フィルターのクリア

Grid Layout and Tab Group

13 ビュー (過去 30 日間)
Mirko Maurici
Mirko Maurici 2019 年 4 月 18 日
編集済み: Alice 2019 年 5 月 14 日
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

採用された回答

Alice
Alice 2019 年 4 月 19 日
編集済み: Alice 2019 年 5 月 14 日
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:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by