Specifications
2 Creating a GUI
2-22
The following figure shows how the GUI now looks when it first displays.
Adding Code to the Callbacks
When the GUI is completed and running, and a user clicks a user interface
control, such as a push button, MATLAB executes the callback specified by the
component’s
Callback property. In the example, the name of the Surf push
button callback is
surf_pushbutton_Callback. For information about the
naming of callbacks see “The Tag Property” on page 2-14.
This section describes how to add the code for the callbacks.
Push Button Callbacks
Each of the push buttons creates a different type of plot using the data specified
by the current selection in the pop-up menu. Their callbacks get data from the
handles structure and then plot it. To add code to the surf push button
callback, click
surf_pushbutton_Callback in the callback pop-up menu.