App Designer - unit of "position" property

20 ビュー (過去 30 日間)
Christian
Christian 2019 年 11 月 19 日
コメント済み: Christian 2019 年 11 月 19 日
Hello everybody,
I was wondering what the units of "x", "y", "width" and "height" in the "Position" field of app.UIFigure are? They can't be pixels because while the app is almost fullscreen on my 14" FHD laptop it's way smaller on my FHD 23" monitor. It would be ideal though if x,y, width and height would be meassured in pixels. This would increase the compatibility of apps between different screen sizes. Is there any way to set the width and height in pixels or percent so that an app is fullscreen on all FHD devices? Resizing is not an option, because it just does not work reliably!
Thank you, Christian

回答 (1 件)

Steven Lord
Steven Lord 2019 年 11 月 19 日
The documentation states that the Units property is 'pixels'. What's the value shown for the ScreenPixelsPerInch property of the groot object on your two systems? Are those values different?
If you want to make your uifigure fullscreen, set its WindowState property to 'fullscreen'.
  1 件のコメント
Christian
Christian 2019 年 11 月 19 日
Steven, my bad. Actually I should've come up with this idea by myself! Using groot you can see, that Matlab does not see the 1080p in laptop mode, because of the 150% scaling in windows settings.
What is the current workaround for this?
~Christian

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by