Set uifigure defaults doesn't work the same as figures
古いコメントを表示
with figures I can set the defaults using
set(groot, 'defaultFigurePosition', [1 1 1 1])
but I can not do the same for uifigures
set(groot, 'defaultuiFigurePosition', [1 1 1 1])
This is also an issue with the new components i want to use uifigures for, like uilabel, or uieditfield.
Is there something i am doing wrong with the new uifigures when trying to set the defaults?
採用された回答
その他の回答 (1 件)
Matt Butts
2023 年 1 月 18 日
移動済み: Adam Danz
2023 年 1 月 18 日
0 投票
I believe both figure and uifigure use the same default. Are you seeing thet uifigures are not utilizing your default that you set in DefaultFigurePosition?
7 件のコメント
Adam Danz
2023 年 1 月 18 日
As Matt mentioned, figure and uifigure use the same defaultFigurePosition. Please let us know if you are experiencing any issues with that.
Walter Roberson
2023 年 1 月 18 日
a = uicontrol()
b = uilabel()
class(a)
class(b)
You will find that class(a) is matlab.ui.control.UIControl and class(b) is matlab.ui.control.Label . That is, there is a class named UIControl but there is no class named UILabel
Adam Danz
2023 年 1 月 18 日
The uipanel units are affected by the parent units.
fig = figure();
fig.Units % normalized
p1 = uipanel(fig);
p1.Units % normalized
uifig = uifigure();
uifig.Units % pixels
p2 = uipanel(uifig);
p2.Units % pixels
Thanks for the info about DefaultFigureUnits in uifigures. That seems to have changed in R2022a. I've submitted a support ticked to address this.
Adam Danz
2023 年 1 月 18 日
matlab.ui.control.Label objects do not have a public units property. This prevents you from setting uilabel units.
カテゴリ
ヘルプ センター および File Exchange で Labels and Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!