MATLAB Creating Graphical User Interfaces

(Barry) #1

6 Lay Out a UI Using GUIDE


Locate and Move Components


You can locate or move components in one of the following ways:

In this section...
“Use Coordinate Readouts” on page 6- 74
“Drag Components” on page 6- 75
“Use Arrow Keys to Move Components” on page 6- 76
“Set the Component's Position Property” on page 6- 76

Another topic that may be of interest is


  • “Align GUIDE UI Components” on page 6- 79


Use Coordinate Readouts


Coordinate readouts indicate where a component is placed and where the mouse pointer
is located. Use these readouts to position and align components manually. The Position
readout shows the position of the selected component as the vector, [x y width
height]. These values are displayed in units of pixels, regardless of the coordinate units
you select for the component.

The Current Point readout displays the current mouse position in pixels.

The size of this push button is 101-by-38 pixels. The lower left corner of the button is
located at x,y = (50,260). The mouse pointer is located at x,y = (156,255).
Free download pdf