MATLAB Creating Graphical User Interfaces

(Barry) #1

6 Lay Out a UI Using GUIDE


If you select a single component and move it, the first two elements of the position vector
(distance from left, distance from bottom) are updated as you move the component. If
you resize the component, the last two elements of the position vector (width, height) are
updated as you change the size. The first two elements may also change if you resize the
component such that the position of its lower left corner changes. If no components are
selected, the position vector is that of the figure.

For more information, see “Use Coordinate Readouts” on page 6-74.

Add a Component to a Panel or Button Group

To add a component to a panel or button group, select the component in the component
palette then move the cursor over the desired panel or button group. The position of the
cursor determines the component's parent.

GUIDE highlights the potential parent as shown in the following figure. The highlight
indicates that if you drop the component or click the cursor, the component will be a child
of the highlighted panel, button group, or figure.
Free download pdf