フィルターのクリア

How to keep the original layout in the full screen or when maximizing the GUI of a MATLAB App ?

12 ビュー (過去 30 日間)
Hello everyone,
I am desinging an App in the MATLAB App Designer, I am using MATLAB R2023a, and I am working on a Windows operating system.
After finishing the design of my App, I have noticed that when running the App, the layout of the designed GUI is lost when the GUI is on full screen or when it is maximized. Please see the attached Capture1 and Capture2 for the layouts of the GUI (Capture1 shows the layout when the GUI is minimised, this is the original layout that I have designed, and Capture2 shows how the layout is changed when the GUI is on full screen or when it is maximized).
I want that the GUI keeps the original layout that I have set when I was designing the App in the App designer, when the GUI is on full screen or when it is maximized.
I have found on some answers of MATLAB Central that I Should select for WindowState "fullscreen" or "maximized" and that I should also select "Resize" and "AutoResizeChildren" in the Settings of POSITION. I have done all that, please see the attached Capture3, but I still have the same problem.
Does anyone have any solution for this problem ?
Many thanks to everyone in advance.
Capture1
Capture2
Capture3

採用された回答

Rik
Rik 2024 年 6 月 15 日
You should set the units to Normalized. That will scale the sizes of the buttons as you expect.
There is an art to this, since you might want your GUI to look good on VGA, as well as 4k.
You could consider using the ResizeFcn property to scale the font size as well.
  5 件のコメント
Rik
Rik 2024 年 6 月 19 日
You need to set the Units property to 'Normalized'. Normally something this should do it:
app.object.Units='Normalized';
Although I admit I have never tested this in an AppDesigner app.
Kamal KHARROUBI
Kamal KHARROUBI 2024 年 6 月 19 日
Ok Rik, I will try it.
Thank you so much for your precious help !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by