
2 Creating a GUI with GUIDE
2-2
GUIDE: A Brief Introduction
GUIDE, the MATLAB Graphical User Interface development environment,
provides a set of tools for creating graphical user interfaces (GUIs). These tools
simplify the process of laying out and programming GUIs.
Laying Out a GUI
The GUIDE Layout Editor enables you to populate a GUI by clicking and
dragging GUI components — such as buttons, text fields, sliders, axes, and so
on — into the layout area. It also enables you to create menus and context
menus for the GUI.
Other tools, which are accessible from the Layout Editor, enable you to size the
GUI, modify component look and feel, align components, set tab order, view a
hierarchical list of the component objects, and set GUI options.
The following topic, “Laying Out a Simple GUI” on page 2-4,uses some of these
tools to show you the basics of laying out a GUI. “GUIDE Tools Summary” on
page 4-3 describes the tools.
Programming the GUI
When you save your GUI layout, GUIDE automatically generates an M-file
that you can use to control how the GUI works. This M-file provides code to
initialize the GUI and contains a framework for the GUI callbacks — the
routines that execute in response to user-generated events such as a mouse
click. Using the M-file editor, you can add code to the callbacks to perform the
functions you want them to. “Programming the GUI” on page 2-19 shows you
what code to add to the example M-file to make the GUI work.
Commentaires sur ces manuels