MATLAB Creating Graphical User Interfaces

(Barry) #1

6 Lay Out a UI Using GUIDE


Look for the highlight as described in “Add a Component to a Panel or Button Group”
on page 6-20.

Front-to-Back Positioning


You can group components inside of panels and button groups. Doing so can enhance the
appearance of your UI and make it easier to navigate.

Use the Object Browser to control the front-to-back order, or stacking order, of panels,
button groups, and the components they contain:

1 Select View > Object Browser.
2 In the layout, select the component you want to appear on top and move it slightly
over the component you want to appear behind it. Moving a component slightly over
another one makes the top component become a child of the one behind it. Notice
that the listing of components in the Object Browser changes when you do this. The
component you move to the top in the layout becomes indented and is listed below
the component that is behind it. This reflects the new parent and child order.

For example, selecting and moving this button slightly over the panel ensures that it
appears on top of the panel in the UI.
Free download pdf