How to make components in uitabgroup align to center of uifigure window when UIFigure.WindowState = 'fullscreen' using AppDesigner?

5 ビュー (過去 30 日間)
I have designed an app that sets app.UIFigure.WindowState = 'fullscreen' on opening. In the UI I am using a tab group each tab of which covers the whole UI panel. When UIFigures is set fullscreen, the tabbed groups still fill the panel, but the components on the group are aligned top left, and I would like them to be in the centre of the UI window in fullscreen mode. I have a grid layout active on the UI.
I've tried accessing UITabGroup.Position, but that is read-only in AppDesigner (and I'm unsure if that would help, because it's not the position, but the alignment of the components in the tab group, which is the issue).

採用された回答

Michael
Michael 2023 年 10 月 6 日
The way to do this is to 1. apply a grid layout to the top level panel on which the tab group appears, set this to one column and one row with 'weight', then 2. apply another grid layout to the tab group in which the components are. By setting the outermost columns and rows of the grid to 'weight' (rather than fixed), the components can float within the expanded window. Depending on the particular layout, the inner rows and columns of the grid can be 'fixed' (to maintain the inner layout), or 'weight' as desired to achieve the intended layout.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by