Creating Graphical User Interfaces |
Creating the GUI M-File
When you first save or run the GUI, GUIDE generates a function M-file that contains the most commonly used callbacks for each component. It also contains some initialization code, an opening function callback, and an output function callback. Each callback is a subfunction that initially consists of a framework that contains just a function definition. You must add code to the callbacks to make them work.
You can save a GUI by selecting Save or Save as from the File menu, or by clicking the Save icon on the toolbar. You can run the GUI by selecting Run from the Tools menu or by clicking the Run icon on the toolbar.
After GUIDE generates the M-file, it opens the Save GUI as dialog. Type a name in the File name field. GUIDE assigns the same name to FIG-file and the M-file. When you click Save, GUIDE saves the M-file and opens it in the M-file Editor. If you are building the GUI in this example, use the filename simple_gui
.
For more information, see Understanding the GUI M-File.
Programming the GUI | Opening the GUI M-File |
© 1994-2005 The MathWorks, Inc.