Size of a mask dialog

Hi,
is there a way to influence / set the size of GroupBoxes, Containers, Edit fields, etc. for masks created with the simulink mask editor? I don't see properties there except for the horizontal stretch which often not really helps.
Is there a way to get the required space / resolution on the screen for a particular mask dialog () to be able to display the dialog in full? Often it is shown with scrollbars which is quite ugly and creates a very bad UX for the user.
As of now I get the dialog with
allOpenDlgs = DAStudio.ToolRoot.getOpenDialogs
dlg = allOpenDlgs(1)
and just assume that dialog(1) is the right one.
Can I somehow check if it originates from the subsystem I expect it to be?
Thanks for your input on those three questions.

Answers (1)

Satyam
Satyam on 12 Mar 2026
Hi Marcus,
The Simulink Mask Editor currently does not provide explicit properties to manually control the pixel size of UI elements such as GroupBoxes, Containers, or Edit fields. Layout is automatically managed by the mask dialog framework.
If a mask dialog appears with scrollbars, it typically means the layout exceeds the available screen space. There is no direct API to query the exact required dialog size before rendering, but using containers (tabs or collapsible groups) and minimizing long prompt strings helps avoid scrollbars.
To get the open dialogs programmatically, using
allOpenDlgs = DAStudio.ToolRoot.getOpenDialogs;
is the correct approach. However, instead of assuming dlg(1) corresponds to your subsystem, you can check the dialog’s associated source object and verify the block path, for example:
allOpenDlgs = DAStudio.ToolRoot.getOpenDialogs;
dlg = allOpenDlgs(1);
src = dlg.getSource;
getfullname(src.getBlock)
This allows you to confirm whether the dialog originates from the expected subsystem.

Categories

Products

Release

R2024b

Tags

Asked:

on 5 Mar 2026

Answered:

on 12 Mar 2026

Community Treasure Hunt

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

Start Hunting!