Creating Graphical User Interfaces Previous page   Next Page

Opening the GUI M-File

In this section you add code to the callbacks for the three push buttons and the pop-up menu.

Once GUIDE has created the M-file, you can open it in the MATLAB editor by clicking the M-file Editor icon on the toolbar. In the editor, you can move the cursor to a specific callback by clicking the function icon letter f on the toolbar on the toolbar, then selecting the callback you want in the pop-up menu that displays.

M file of simple GUI with list of callbacks

For example, clicking simple_gui_OpeningFcn moves the cursor to the opening function. The next topic explains how you can add code to the opening function to create data for the GUI or perform other tasks.

display of code for the opening function


Previous page  Creating the GUI M-File Sharing Data Between Callbacks Next page

© 1994-2005 The MathWorks, Inc.