Creating Graphical User Interfaces    

Laying Out GUIs - The Layout Editor

The Layout Editor enables you to select GUI components (uicontrol objects) from the component palette, at the left side of Layout Editor, and arrange them in the layout area, to the right. When you press the Run button, the functioning GUI appears outside the Layout Editor.

To start the Layout Editor, first open the GUIDE Quick Start dialog by entering guide at the MATLAB prompt. Click OK in the dialog to open a blank GUI template in the Layout Editor, as shown in the following picture.

If you want to load an existing GUI for editing, type

or use Open... from the File menu on the Layout Editor.

Placing Objects In the Layout Area

Select the type of component you want to place in your GUI by clicking on it in the component palette. The cursor changes to a cross, which you can then use to select the position of the upper-left corner of the control, or you can set the size of the control by clicking in the layout area and then dragging the cursor to the lower-right corner before releasing the mouse button.

Note that components in the Layout Editor are not active. The next section describes how to generate a functioning GUI.

Running the GUI

To run the GUI you design in the Layout Editor, select Run in the Tools menu or click the green Run button on the toolbar.

When you run a GUI, the following occurs:


  GUIDE Layout Tools Saving the Layout