| Contents | Index |
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 code file.
Initialization tasks such as data creation and any processing for constructing the components. See Initialize a Programmatic GUI for information.
Construction of figure and components. See Lay Out a Programmatic GUI for information.
Initialization tasks that require the components to exist, and output return. See Initialize a Programmatic 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 Write Code for Callbacks and Examples: Program 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 an example, see the documentation for msgbox, which also provides links to functions that create specialized predefined dialog boxes. |
![]() | Code a Programmatic GUI | Initialize a Programmatic GUI | ![]() |

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