MATLAB Creating Graphical User Interfaces

(ff) #1

Managing Resizable Apps in App Designer


Apps you create in App Designer are resizable by default. The components reposition and
resize automatically as the user changes the size of the window at run-time. This
automatic resize behavior is controlled by the AutoResizeChildren property. By
default, this property is enabled for the figure and child containers such as panels and
tabs.

When the AutoResizeChildren property is enabled for a container, MATLAB manages
the size and position of only the immediate children in the container. Components in
nested containers are managed by the AutoResizeChildren property of their
immediate parent. To ensure that the alignment of components relative to one another
(like a grouping of buttons) is preserved when your app is resized, parent the grouping of
components to a panel, instead of directly to the figure.

Resizing Components with Normalized Position Units


When a child component of a resizable container has normalized position units, certain
properties of the component are affected after the parent container is resized. For
example,

If axes or charts use a value of 'normalized' for the Units property and are parented
to a container with the AutoResizeChildren property set to 'on', then

Managing Resizable Apps in App Designer
Free download pdf