
6 Creating Graphical User Interfaces
Programming a GUI
After laying out the GUI and setting component properties, the next step is to
program the GUI. You program the GUI by coding one or more callbacks for
each of its components. Callbacks a re functions that e xecute in response to
some action by the user. A typical action is clicking a push button.
A GUI’s callbacks are found in an M-file that GUIDE generates automatically.
GUIDE adds templates for the most commonly used callbacks to this M-file,
butyoumaywanttoaddothers.UsetheM-fileEditortoeditthisfile.
The following figure shows the C allback template for a pus h button.
To learn more about programming a GUI, see “C reating a Simple GUI with
GUIDE” in the M ATLAB Creating GUIs documentation.
6-6
Comentarios a estos manuales