GUI Grid Resizing Problem

24 ビュー (過去 30 日間)
Ilaria Sofia
Ilaria Sofia 2024 年 1 月 2 日
コメント済み: Ilaria Sofia 2024 年 1 月 8 日
I've got a major problem with the resizing of my application. I've put the grid so that the components can be resized to the size of the screen used but when i expand the GUI to fullscreen it's not resizing correctly. Some Tabs appear half the size they should be while other resize correctly. I've looked up the matlab doc but i can't figure out what i'm doing wrong.
I've inserted the necessary files to test the GUI. In the login screen you have to insert 'admin' and then 'pass' and then go to 'Caricamento File' and load up the two files.
Thanks a lot for anyone who'll answer!

採用された回答

Swaraj
Swaraj 2024 年 1 月 8 日
Hi Ilaria,
As I was able to see at a few places, on resizing the App, some tabs/buttons get resized properly while others do not get resized and remain the same. In these instances, I observed that in some places you have provided the column width fixed. When you provide a fixed pixel size, the column width does not change when the parent container resizes. The same applies to row height as well.
There are three different types of column widths:
  • Fit width — Specify 'fit'. Column width automatically adjusts to fit its contents. For text-based components, 'fit' width adjusts with font properties to show the whole text. For non text-based components, 'fit' width is based on the default size of the component and other factors. Use 'fit' width if you want to avoid hard-coding the column width to fit components, or if your app is translated to another language or runs on different platforms.
  • Fixed width in pixels — Specify a number. The column width is fixed at the number of pixels you specify. When the parent container resizes, the column width does not change.
  • Variable width — Specify a number paired with an 'x' character (for example, '1x'). When the parent container resizes, the column width grows or shrinks. Variable-width columns fill the remaining horizontal space that the fixed-width columns do not use. The number you pair with the 'x' character is a weight for dividing up the remaining space among all the variable-width columns. If the grid has only one variable-width column, then it uses all the remaining space regardless of the number. If there are multiple variable-width columns that use the same number, then they share the space equally. Otherwise, the amount of space is proportional to the number.
For more information, please follow the below documentation.
Hope it helps!!
  1 件のコメント
Ilaria Sofia
Ilaria Sofia 2024 年 1 月 8 日
Thanks a lot for taking the time!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApp Building についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by