フィルターのクリア

How to get app designer radio button group spacing to auto resize with window

13 ビュー (過去 30 日間)
Michael
Michael 2023 年 11 月 3 日
コメント済み: Michael 2023 年 11 月 22 日
I have an app that (necessarily) automatically resizes to fill the screen on launch (app.UIFigure.WindowState = 'fullscreen'). The app uses grid layouts on all panels. I have a radio button group assigned to a panel grid layout, the columns and rows of which are weighted, so that the components scale up on the window resizing. Although the radio button 'group' expands, the spacing between buttons themselves does not. I need the spacing between buttons to expand proportionately with the size of the button group.
(How) is this possible?
  2 件のコメント
Guck
Guck 2023 年 11 月 8 日
編集済み: Guck 2023 年 11 月 9 日
You can use the 'Padding' property of the grid layout in MATLAB's Application Designer. By adjusting the padding values, you can control the spacing between buttons as the button group expands uno online.
Michael
Michael 2023 年 11 月 9 日
That doesn't seem to have any effect.

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

回答 (1 件)

Neha
Neha 2023 年 11 月 14 日
Hi Michael,
I understand that you are facing an issue in App Designer where the spacing between the radio buttons does not scale on resizing the figure window. You can try setting the "Units" property of each "uicontrol" to "normalized". If this doesn't help in resolving your issue, you can try implementing the other suggestions as explained in this MATLAB Answer:
Hope this helps!
  1 件のコメント
Michael
Michael 2023 年 11 月 22 日
This did help some, in that the spacing changes a bit with normalised units, but it doesn't seem to follow the behaviour of the app window - the additional spacing is not enough to scale the button group with the window. Thanks for the tip anyway.

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

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by