| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
After laying out your GUI, program its behavior. This chapter addresses the programming of GUIs created programmatically. Specifically, it discusses data creation, GUI initialization, and the use of callbacks to control GUI behavior.
The following ordered list shows these topics within the organization of the typical GUI M-file.
Initialization tasks such as data creation and any processing for constructing the components. See Initializing the GUI for information.
Construction of figure and components. See Laying Out a GUI for information.
Initialization tasks that require the components to exist, and output return. See Initializing the GUI for information.
Callbacks for the components. Callbacks are the routines that execute in response to user-generated events such as mouse clicks and key strokes. See Callbacks: An Overview and Examples: Programming GUI Components for information.
Discussions in this chapter assume the use of nested functions. For information about using nested functions, see Nested Functions in the MATLAB Programming Fundamentals documentation.
See Function Reference in the MATLAB Function Reference documentation for a list of functions provided for GUI creation.
Note MATLAB software provides a selection of standard dialog boxes that you can create with a single function call. For information about these dialog boxes and the functions used to create them, see Predefined Dialog Boxes in the MATLAB Function Reference documentation. |
![]() | Programming the GUI | Initializing the GUI | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |