MATLAB Creating Graphical User Interfaces

(Barry) #1

6 Lay Out a UI Using GUIDE


Copy, Paste, and Arrange Components


This topic provides basic information about selecting, copying, pasting, and deleting
components in the layout area.

In this section...
“Select Components” on page 6- 70
“Copy, Cut, and Clear Components” on page 6- 71
“Paste and Duplicate Components” on page 6- 71
“Front-to-Back Positioning” on page 6- 72

Select Components


You can select components in the layout area in the following ways:


  • Click a single component to select it.

  • Press Ctrl+A to select all child objects of the figure. This does not select components
    that are child objects of panels or button groups.

  • Click and drag the cursor to create a rectangle that encloses the components you want
    to select. If the rectangle encloses a panel or button group, only the panel or button
    group is selected, not its children. If the rectangle encloses part of a panel or button
    group, only the components within the rectangle that are child objects of the panel or
    button group are selected.

  • Select multiple components using the Shift and Ctrl keys.


In some cases, a component may lie outside its parent's boundary. Such a component is
not visible in the Layout Editor but can be selected by dragging a rectangle that encloses
it or by selecting it in the Object Browser. Such a component is visible in the active UI.

See “View the GUIDE Object Hierarchy” on page 6-119 for information about the
Object Browser.

NoteYou can select multiple components only if they have the same parent. To
determine the child objects of a figure, panel, or button group, use the Object Browser.
Free download pdf